diff --git a/.github/mise.toml b/.github/mise.toml new file mode 100644 index 0000000000..6930d41187 --- /dev/null +++ b/.github/mise.toml @@ -0,0 +1,10 @@ +[tasks.install] +run = "pnpm install --filter github --frozen-lockfile" + +[tasks.format] +env._.path = "./node_modules/.bin" +run = "prettier --check ." + +[tasks."format-fix"] +env._.path = "./node_modules/.bin" +run = "prettier --write ." diff --git a/.github/workflows/build-mobile.yml b/.github/workflows/build-mobile.yml index 1286b45409..e4ae09bfd7 100644 --- a/.github/workflows/build-mobile.yml +++ b/.github/workflows/build-mobile.yml @@ -1,12 +1,16 @@ name: Build Mobile on: - workflow_dispatch: workflow_call: inputs: ref: required: false type: string + environment: + description: 'Target environment' + required: true + default: 'development' + type: string secrets: KEY_JKS: required: true @@ -16,6 +20,30 @@ on: required: true ANDROID_STORE_PASSWORD: required: true + APP_STORE_CONNECT_API_KEY_ID: + required: true + APP_STORE_CONNECT_API_KEY_ISSUER_ID: + required: true + APP_STORE_CONNECT_API_KEY: + required: true + IOS_CERTIFICATE_P12: + required: true + IOS_CERTIFICATE_PASSWORD: + required: true + IOS_PROVISIONING_PROFILE: + required: true + IOS_PROVISIONING_PROFILE_SHARE_EXTENSION: + required: true + IOS_PROVISIONING_PROFILE_WIDGET_EXTENSION: + required: true + IOS_DEVELOPMENT_PROVISIONING_PROFILE: + required: true + IOS_DEVELOPMENT_PROVISIONING_PROFILE_SHARE_EXTENSION: + required: true + IOS_DEVELOPMENT_PROVISIONING_PROFILE_WIDGET_EXTENSION: + required: true + FASTLANE_TEAM_ID: + required: true pull_request: push: branches: [main] @@ -137,7 +165,7 @@ jobs: fi - name: Publish Android Artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: release-apk-signed path: mobile/build/app/outputs/flutter-apk/*.apk @@ -193,17 +221,22 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.4.7' + ruby-version: '3.3' working-directory: ./mobile/ios - - name: Install Fastlane + - name: Install CocoaPods dependencies + working-directory: ./mobile/ios + run: | + pod install + + - name: Install Fastlane + working-directory: ./mobile/ios run: | - cd mobile/ios gem install bundler bundle config set --local path 'vendor/bundle' bundle install - - name: Create API Key JSON + - name: Create API Key env: API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} @@ -212,35 +245,55 @@ jobs: run: | mkdir -p ~/.appstoreconnect/private_keys echo "$API_KEY_CONTENT" | base64 --decode > ~/.appstoreconnect/private_keys/AuthKey_${API_KEY_ID}.p8 - cat > api_key.json << EOF - { - "key_id": "${API_KEY_ID}", - "issuer_id": "${API_KEY_ISSUER_ID}", - "key": "$(cat ~/.appstoreconnect/private_keys/AuthKey_${API_KEY_ID}.p8)", - "duration": 1200, - "in_house": false - } - EOF - - name: Import Certificate and Provisioning Profile + - name: Import Certificate and Provisioning Profiles env: IOS_CERTIFICATE_P12: ${{ secrets.IOS_CERTIFICATE_P12 }} IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} IOS_PROVISIONING_PROFILE: ${{ secrets.IOS_PROVISIONING_PROFILE }} + IOS_PROVISIONING_PROFILE_SHARE_EXTENSION: ${{ secrets.IOS_PROVISIONING_PROFILE_SHARE_EXTENSION }} + IOS_PROVISIONING_PROFILE_WIDGET_EXTENSION: ${{ secrets.IOS_PROVISIONING_PROFILE_WIDGET_EXTENSION }} + IOS_DEVELOPMENT_PROVISIONING_PROFILE: ${{ secrets.IOS_DEVELOPMENT_PROVISIONING_PROFILE }} + IOS_DEVELOPMENT_PROVISIONING_PROFILE_SHARE_EXTENSION: ${{ secrets.IOS_DEVELOPMENT_PROVISIONING_PROFILE_SHARE_EXTENSION }} + IOS_DEVELOPMENT_PROVISIONING_PROFILE_WIDGET_EXTENSION: ${{ secrets.IOS_DEVELOPMENT_PROVISIONING_PROFILE_WIDGET_EXTENSION }} + ENVIRONMENT: ${{ inputs.environment || 'development' }} working-directory: ./mobile/ios run: | + # Decode certificate echo "$IOS_CERTIFICATE_P12" | base64 --decode > certificate.p12 - echo "$IOS_PROVISIONING_PROFILE" | base64 --decode > profile.mobileprovision - - name: Create keychain + # Decode provisioning profiles based on environment + if [[ "$ENVIRONMENT" == "development" ]]; then + echo "$IOS_DEVELOPMENT_PROVISIONING_PROFILE" | base64 --decode > profile_dev.mobileprovision + echo "$IOS_DEVELOPMENT_PROVISIONING_PROFILE_SHARE_EXTENSION" | base64 --decode > profile_dev_share.mobileprovision + echo "$IOS_DEVELOPMENT_PROVISIONING_PROFILE_WIDGET_EXTENSION" | base64 --decode > profile_dev_widget.mobileprovision + ls -lh profile_dev*.mobileprovision + else + echo "$IOS_PROVISIONING_PROFILE" | base64 --decode > profile.mobileprovision + echo "$IOS_PROVISIONING_PROFILE_SHARE_EXTENSION" | base64 --decode > profile_share.mobileprovision + echo "$IOS_PROVISIONING_PROFILE_WIDGET_EXTENSION" | base64 --decode > profile_widget.mobileprovision + ls -lh profile*.mobileprovision + fi + + - name: Create keychain and import certificate env: KEYCHAIN_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} + CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} + working-directory: ./mobile/ios run: | + # Create keychain security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain security default-keychain -s build.keychain security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain security set-keychain-settings -t 3600 -u build.keychain + # Import certificate + security import certificate.p12 -k build.keychain -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security + security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" build.keychain + + # Verify certificate was imported + security find-identity -v -p codesigning build.keychain + - name: Build and deploy to TestFlight env: FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }} @@ -249,8 +302,14 @@ jobs: KEYCHAIN_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + ENVIRONMENT: ${{ inputs.environment || 'development' }} working-directory: ./mobile/ios - run: bundle exec fastlane release_ci + run: | + if [[ "$ENVIRONMENT" == "development" ]]; then + bundle exec fastlane gha_testflight_dev + else + bundle exec fastlane gha_release_prod + fi - name: Clean up keychain if: always() @@ -258,7 +317,7 @@ jobs: security delete-keychain build.keychain || true - name: Upload IPA artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: ios-release-ipa path: mobile/ios/Runner.ipa diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index dae8cec1fd..fc2c9f6853 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -84,7 +84,7 @@ jobs: token: ${{ steps.token.outputs.token }} - name: Set up QEMU - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 + uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 @@ -105,7 +105,7 @@ jobs: - name: Generate docker image tags id: metadata - uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 + uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0 with: flavor: | latest=false diff --git a/.github/workflows/close-duplicates.yml b/.github/workflows/close-duplicates.yml index ba360b50dc..b3c79f81d8 100644 --- a/.github/workflows/close-duplicates.yml +++ b/.github/workflows/close-duplicates.yml @@ -35,7 +35,7 @@ jobs: needs: [get_body, should_run] if: ${{ needs.should_run.outputs.should_run == 'true' }} container: - image: ghcr.io/immich-app/mdq:main@sha256:6b8450bfc06770af1af66bce9bf2ced7d1d9b90df1a59fc4c83a17777a9f6723 + image: ghcr.io/immich-app/mdq:main@sha256:9c905a4ff69f00c4b2f98b40b6090ab3ab18d1a15ed1379733b8691aa1fcb271 outputs: checked: ${{ steps.get_checkbox.outputs.checked }} steps: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3f32478c0c..34228843ad 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -57,7 +57,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 # v4.30.9 + uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -70,7 +70,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@16140ae1a102900babc80a33c44059580f687047 # v4.30.9 + uses: github/codeql-action/autobuild@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -83,6 +83,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v4.30.9 + uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2 with: category: '/language:${{matrix.language}}' diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index 2a28b57569..823aa98fc8 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -85,7 +85,7 @@ jobs: run: pnpm build - name: Upload build output - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 with: name: docs-build-output path: docs/build/ diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index a74a2ec613..5d01646fef 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -174,7 +174,7 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }} working-directory: 'deployment/modules/cloudflare/docs' - run: 'mise run tf apply' + run: 'mise run //deployment:tf apply' - name: Deploy Docs Subdomain Output id: docs-output @@ -186,7 +186,7 @@ jobs: TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }} working-directory: 'deployment/modules/cloudflare/docs' run: | - mise run tf output -- -json | jq -r ' + mise run //deployment:tf output -- -json | jq -r ' "projectName=\(.pages_project_name.value)", "subdomain=\(.immich_app_branch_subdomain.value)" ' >> $GITHUB_OUTPUT @@ -211,7 +211,7 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }} working-directory: 'deployment/modules/cloudflare/docs-release' - run: 'mise run tf apply' + run: 'mise run //deployment:tf apply' - name: Comment uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b # v3.2.0 diff --git a/.github/workflows/docs-destroy.yml b/.github/workflows/docs-destroy.yml index 7de2d81858..3ad3f3558e 100644 --- a/.github/workflows/docs-destroy.yml +++ b/.github/workflows/docs-destroy.yml @@ -39,7 +39,7 @@ jobs: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }} working-directory: 'deployment/modules/cloudflare/docs' - run: 'mise run tf destroy -- -refresh=false' + run: 'mise run //deployment:tf destroy -- -refresh=false' - name: Comment uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b # v3.2.0 diff --git a/.github/workflows/fix-format.yml b/.github/workflows/fix-format.yml index 90810c2cfc..f7f34b929c 100644 --- a/.github/workflows/fix-format.yml +++ b/.github/workflows/fix-format.yml @@ -39,7 +39,7 @@ jobs: cache-dependency-path: '**/pnpm-lock.yaml' - name: Fix formatting - run: make install-all && make format-all + run: pnpm --recursive install && pnpm run --recursive --parallel fix:format - name: Commit and push uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4 diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 4aa78ee13a..6e7ee8f608 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -62,7 +62,7 @@ jobs: ref: main - name: Install uv - uses: astral-sh/setup-uv@2ddd2b9cb38ad8efd50337e8ab201519a34c9f24 # v7.1.1 + uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2 - name: Setup pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 @@ -99,8 +99,23 @@ jobs: ALIAS: ${{ secrets.ALIAS }} ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }} + # iOS secrets + APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }} + APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} + APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }} + IOS_CERTIFICATE_P12: ${{ secrets.IOS_CERTIFICATE_P12 }} + IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} + IOS_PROVISIONING_PROFILE: ${{ secrets.IOS_PROVISIONING_PROFILE }} + IOS_PROVISIONING_PROFILE_SHARE_EXTENSION: ${{ secrets.IOS_PROVISIONING_PROFILE_SHARE_EXTENSION }} + IOS_PROVISIONING_PROFILE_WIDGET_EXTENSION: ${{ secrets.IOS_PROVISIONING_PROFILE_WIDGET_EXTENSION }} + IOS_DEVELOPMENT_PROVISIONING_PROFILE: ${{ secrets.IOS_DEVELOPMENT_PROVISIONING_PROFILE }} + IOS_DEVELOPMENT_PROVISIONING_PROFILE_SHARE_EXTENSION: ${{ secrets.IOS_DEVELOPMENT_PROVISIONING_PROFILE_SHARE_EXTENSION }} + IOS_DEVELOPMENT_PROVISIONING_PROFILE_WIDGET_EXTENSION: ${{ secrets.IOS_DEVELOPMENT_PROVISIONING_PROFILE_WIDGET_EXTENSION }} + FASTLANE_TEAM_ID: ${{ secrets.FASTLANE_TEAM_ID }} + with: ref: ${{ needs.bump_version.outputs.ref }} + environment: production prepare_release: runs-on: ubuntu-latest @@ -123,7 +138,7 @@ jobs: persist-credentials: false - name: Download APK - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 with: name: release-apk-signed github-token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c7eae6532..44d7250f2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -382,6 +382,7 @@ jobs: uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false + submodules: 'recursive' token: ${{ steps.token.outputs.token }} - name: Setup pnpm uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 @@ -562,7 +563,7 @@ jobs: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Install uv - uses: astral-sh/setup-uv@2ddd2b9cb38ad8efd50337e8ab201519a34c9f24 # v7.1.1 + uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2 - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 # TODO: add caching when supported (https://github.com/actions/setup-python/pull/818) # with: diff --git a/cli/mise.toml b/cli/mise.toml new file mode 100644 index 0000000000..740184e03d --- /dev/null +++ b/cli/mise.toml @@ -0,0 +1,29 @@ +[tasks.install] +run = "pnpm install --filter @immich/cli --frozen-lockfile" + +[tasks.build] +env._.path = "./node_modules/.bin" +run = "vite build" + +[tasks.test] +env._.path = "./node_modules/.bin" +run = "vite" + +[tasks.lint] +env._.path = "./node_modules/.bin" +run = "eslint \"src/**/*.ts\" --max-warnings 0" + +[tasks."lint-fix"] +run = { task = "lint --fix" } + +[tasks.format] +env._.path = "./node_modules/.bin" +run = "prettier --check ." + +[tasks."format-fix"] +env._.path = "./node_modules/.bin" +run = "prettier --write ." + +[tasks.check] +env._.path = "./node_modules/.bin" +run = "tsc --noEmit" diff --git a/cli/package.json b/cli/package.json index 0d635fce07..6fed806003 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@immich/cli", - "version": "2.2.98", + "version": "2.2.101", "description": "Command Line Interface (CLI) for Immich", "type": "module", "exports": "./dist/index.js", @@ -20,7 +20,7 @@ "@types/lodash-es": "^4.17.12", "@types/micromatch": "^4.0.9", "@types/mock-fs": "^4.13.1", - "@types/node": "^22.18.12", + "@types/node": "^22.19.0", "@vitest/coverage-v8": "^3.0.0", "byte-size": "^9.0.0", "cli-progress": "^3.12.0", diff --git a/deployment/mise.toml b/deployment/mise.toml new file mode 100644 index 0000000000..f3d07ac31f --- /dev/null +++ b/deployment/mise.toml @@ -0,0 +1,20 @@ +[tools] +terragrunt = "0.91.2" +opentofu = "1.10.6" + +[tasks."tg:fmt"] +run = "terragrunt hclfmt" +description = "Format terragrunt files" + +[tasks.tf] +run = "terragrunt run --all" +description = "Wrapper for terragrunt run-all" +dir = "{{cwd}}" + +[tasks."tf:fmt"] +run = "tofu fmt -recursive tf/" +description = "Format terraform files" + +[tasks."tf:init"] +run = { task = "tf init -- -reconfigure" } +dir = "{{cwd}}" diff --git a/docker/docker-compose.prod.yml b/docker/docker-compose.prod.yml index a8c0de7454..e01f4ead22 100644 --- a/docker/docker-compose.prod.yml +++ b/docker/docker-compose.prod.yml @@ -83,7 +83,7 @@ services: container_name: immich_prometheus ports: - 9090:9090 - image: prom/prometheus@sha256:23031bfe0e74a13004252caaa74eccd0d62b6c6e7a04711d5b8bf5b7e113adc7 + image: prom/prometheus@sha256:49214755b6153f90a597adcbff0252cc61069f8ab69ce8411285cd4a560e8038 volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml - prometheus-data:/prometheus diff --git a/docs/docs/administration/postgres-standalone.md b/docs/docs/administration/postgres-standalone.md index fd9b8a5e4d..2b7527623f 100644 --- a/docs/docs/administration/postgres-standalone.md +++ b/docs/docs/administration/postgres-standalone.md @@ -10,16 +10,19 @@ Running with a pre-existing Postgres server can unlock powerful administrative f ## Prerequisites -You must install `pgvector` (`>= 0.7.0, < 1.0.0`), as it is a prerequisite for `vchord`. +You must install pgvector as it is a prerequisite for VectorChord. The easiest way to do this on Debian/Ubuntu is by adding the [PostgreSQL Apt repository][pg-apt] and then running `apt install postgresql-NN-pgvector`, where `NN` is your Postgres version (e.g., `16`). You must install VectorChord into your instance of Postgres using their [instructions][vchord-install]. After installation, add `shared_preload_libraries = 'vchord.so'` to your `postgresql.conf`. If you already have some `shared_preload_libraries` set, you can separate each extension with a comma. For example, `shared_preload_libraries = 'pg_stat_statements, vchord.so'`. -:::note -Immich is known to work with Postgres versions `>= 14, < 18`. +:::note Supported versions +Immich is known to work with Postgres versions `>= 14, < 19`. -Make sure the installed version of VectorChord is compatible with your version of Immich. The current accepted range for VectorChord is `>= 0.3.0, < 0.5.0`. +VectorChord is known to work with pgvector versions `>= 0.7, < 0.9`. + +The Immich server will check the VectorChord version on startup to ensure compatibility, and refuse to start if a compatible version is not found. +The current accepted range for VectorChord is `>= 0.3, < 0.6`. ::: ## Specifying the connection URL diff --git a/docs/docs/features/mobile-app.mdx b/docs/docs/features/mobile-app.mdx index 2d34507a26..8b9a204741 100644 --- a/docs/docs/features/mobile-app.mdx +++ b/docs/docs/features/mobile-app.mdx @@ -10,6 +10,16 @@ import MobileAppBackup from '/docs/partials/_mobile-app-backup.md'; +:::info Android verification +Below are the SHA-256 fingerprints for the certificates signing the android applications. + +- Playstore / Github releases: + `86:C5:C4:55:DF:AF:49:85:92:3A:8F:35:AD:B3:1D:0C:9E:0B:95:7D:7F:94:C2:D2:AF:6A:24:38:AA:96:00:20` +- F-Droid releases: + `FA:8B:43:95:F4:A6:47:71:A0:53:D1:C7:57:73:5F:A2:30:13:74:F5:3D:58:0D:D1:75:AA:F7:A1:35:72:9C:BF` + +::: + :::info Beta Program The beta release channel allows users to test upcoming changes before they are officially released. To join the channel use the links below. diff --git a/docs/docs/guides/database-queries.md b/docs/docs/guides/database-queries.md index 5cdcdc04c4..c2328d2bb8 100644 --- a/docs/docs/guides/database-queries.md +++ b/docs/docs/guides/database-queries.md @@ -106,14 +106,14 @@ SELECT "user"."email", "asset"."type", COUNT(*) FROM "asset" ```sql title="Count by tag" SELECT "t"."value" AS "tag_name", COUNT(*) AS "number_assets" FROM "tag" "t" - JOIN "tag_asset" "ta" ON "t"."id" = "ta"."tagsId" JOIN "asset" "a" ON "ta"."assetsId" = "a"."id" + JOIN "tag_asset" "ta" ON "t"."id" = "ta"."tagId" JOIN "asset" "a" ON "ta"."assetId" = "a"."id" WHERE "a"."visibility" != 'hidden' GROUP BY "t"."value" ORDER BY "number_assets" DESC; ``` ```sql title="Count by tag (per user)" SELECT "t"."value" AS "tag_name", "u"."email" as "user_email", COUNT(*) AS "number_assets" FROM "tag" "t" - JOIN "tag_asset" "ta" ON "t"."id" = "ta"."tagsId" JOIN "asset" "a" ON "ta"."assetsId" = "a"."id" JOIN "user" "u" ON "a"."ownerId" = "u"."id" + JOIN "tag_asset" "ta" ON "t"."id" = "ta"."tagId" JOIN "asset" "a" ON "ta"."assetId" = "a"."id" JOIN "user" "u" ON "a"."ownerId" = "u"."id" WHERE "a"."visibility" != 'hidden' GROUP BY "t"."value", "u"."email" ORDER BY "number_assets" DESC; ``` diff --git a/docs/docs/install/config-file.md b/docs/docs/install/config-file.md index 3fb0687e4a..a6aaae149b 100644 --- a/docs/docs/install/config-file.md +++ b/docs/docs/install/config-file.md @@ -16,48 +16,76 @@ The default configuration looks like this: ```json { - "ffmpeg": { - "crf": 23, - "threads": 0, - "preset": "ultrafast", - "targetVideoCodec": "h264", - "acceptedVideoCodecs": ["h264"], - "targetAudioCodec": "aac", - "acceptedAudioCodecs": ["aac", "mp3", "libopus", "pcm_s16le"], - "acceptedContainers": ["mov", "ogg", "webm"], - "targetResolution": "720", - "maxBitrate": "0", - "bframes": -1, - "refs": 0, - "gopSize": 0, - "temporalAQ": false, - "cqMode": "auto", - "twoPass": false, - "preferredHwDevice": "auto", - "transcode": "required", - "tonemap": "hable", - "accel": "disabled", - "accelDecode": false - }, "backup": { "database": { - "enabled": true, "cronExpression": "0 02 * * *", + "enabled": true, "keepLastAmount": 14 } }, + "ffmpeg": { + "accel": "disabled", + "accelDecode": false, + "acceptedAudioCodecs": ["aac", "mp3", "libopus"], + "acceptedContainers": ["mov", "ogg", "webm"], + "acceptedVideoCodecs": ["h264"], + "bframes": -1, + "cqMode": "auto", + "crf": 23, + "gopSize": 0, + "maxBitrate": "0", + "preferredHwDevice": "auto", + "preset": "ultrafast", + "refs": 0, + "targetAudioCodec": "aac", + "targetResolution": "720", + "targetVideoCodec": "h264", + "temporalAQ": false, + "threads": 0, + "tonemap": "hable", + "transcode": "required", + "twoPass": false + }, + "image": { + "colorspace": "p3", + "extractEmbedded": false, + "fullsize": { + "enabled": false, + "format": "jpeg", + "quality": 80 + }, + "preview": { + "format": "jpeg", + "quality": 80, + "size": 1440 + }, + "thumbnail": { + "format": "webp", + "quality": 80, + "size": 250 + } + }, "job": { "backgroundTask": { "concurrency": 5 }, - "smartSearch": { + "faceDetection": { "concurrency": 2 }, + "library": { + "concurrency": 5 + }, "metadataExtraction": { "concurrency": 5 }, - "faceDetection": { - "concurrency": 2 + "migration": { + "concurrency": 5 + }, + "notifications": { + "concurrency": 5 + }, + "ocr": { + "concurrency": 1 }, "search": { "concurrency": 5 @@ -65,20 +93,23 @@ The default configuration looks like this: "sidecar": { "concurrency": 5 }, - "library": { - "concurrency": 5 - }, - "migration": { - "concurrency": 5 + "smartSearch": { + "concurrency": 2 }, "thumbnailGeneration": { "concurrency": 3 }, "videoConversion": { "concurrency": 1 + } + }, + "library": { + "scan": { + "cronExpression": "0 0 * * *", + "enabled": true }, - "notifications": { - "concurrency": 5 + "watch": { + "enabled": false } }, "logging": { @@ -86,8 +117,11 @@ The default configuration looks like this: "level": "log" }, "machineLearning": { - "enabled": true, - "urls": ["http://immich-machine-learning:3003"], + "availabilityChecks": { + "enabled": true, + "interval": 30000, + "timeout": 2000 + }, "clip": { "enabled": true, "modelName": "ViT-B-32__openai" @@ -96,27 +130,59 @@ The default configuration looks like this: "enabled": true, "maxDistance": 0.01 }, + "enabled": true, "facialRecognition": { "enabled": true, - "modelName": "buffalo_l", - "minScore": 0.7, "maxDistance": 0.5, - "minFaces": 3 - } + "minFaces": 3, + "minScore": 0.7, + "modelName": "buffalo_l" + }, + "ocr": { + "enabled": true, + "maxResolution": 736, + "minDetectionScore": 0.5, + "minRecognitionScore": 0.8, + "modelName": "PP-OCRv5_mobile" + }, + "urls": ["http://immich-machine-learning:3003"] }, "map": { + "darkStyle": "https://tiles.immich.cloud/v1/style/dark.json", "enabled": true, - "lightStyle": "https://tiles.immich.cloud/v1/style/light.json", - "darkStyle": "https://tiles.immich.cloud/v1/style/dark.json" - }, - "reverseGeocoding": { - "enabled": true + "lightStyle": "https://tiles.immich.cloud/v1/style/light.json" }, "metadata": { "faces": { "import": false } }, + "newVersionCheck": { + "enabled": true + }, + "nightlyTasks": { + "clusterNewFaces": true, + "databaseCleanup": true, + "generateMemories": true, + "missingThumbnails": true, + "startTime": "00:00", + "syncQuotaUsage": true + }, + "notifications": { + "smtp": { + "enabled": false, + "from": "", + "replyTo": "", + "transport": { + "host": "", + "ignoreCert": false, + "password": "", + "port": 587, + "secure": false, + "username": "" + } + } + }, "oauth": { "autoLaunch": false, "autoRegister": true, @@ -128,70 +194,44 @@ The default configuration looks like this: "issuerUrl": "", "mobileOverrideEnabled": false, "mobileRedirectUri": "", + "profileSigningAlgorithm": "none", + "roleClaim": "immich_role", "scope": "openid email profile", "signingAlgorithm": "RS256", - "profileSigningAlgorithm": "none", "storageLabelClaim": "preferred_username", - "storageQuotaClaim": "immich_quota" + "storageQuotaClaim": "immich_quota", + "timeout": 30000, + "tokenEndpointAuthMethod": "client_secret_post" }, "passwordLogin": { "enabled": true }, + "reverseGeocoding": { + "enabled": true + }, + "server": { + "externalDomain": "", + "loginPageMessage": "", + "publicUsers": true + }, "storageTemplate": { "enabled": false, "hashVerificationEnabled": true, "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}" }, - "image": { - "thumbnail": { - "format": "webp", - "size": 250, - "quality": 80 - }, - "preview": { - "format": "jpeg", - "size": 1440, - "quality": 80 - }, - "colorspace": "p3", - "extractEmbedded": false - }, - "newVersionCheck": { - "enabled": true - }, - "trash": { - "enabled": true, - "days": 30 + "templates": { + "email": { + "albumInviteTemplate": "", + "albumUpdateTemplate": "", + "welcomeTemplate": "" + } }, "theme": { "customCss": "" }, - "library": { - "scan": { - "enabled": true, - "cronExpression": "0 0 * * *" - }, - "watch": { - "enabled": false - } - }, - "server": { - "externalDomain": "", - "loginPageMessage": "" - }, - "notifications": { - "smtp": { - "enabled": false, - "from": "", - "replyTo": "", - "transport": { - "ignoreCert": false, - "host": "", - "port": 587, - "username": "", - "password": "" - } - } + "trash": { + "days": 30, + "enabled": true }, "user": { "deleteDelay": 7 diff --git a/docs/docs/install/environment-variables.md b/docs/docs/install/environment-variables.md index 78a5289bf4..55c226d507 100644 --- a/docs/docs/install/environment-variables.md +++ b/docs/docs/install/environment-variables.md @@ -149,29 +149,31 @@ Redis (Sentinel) URL example JSON before encoding: ## Machine Learning -| Variable | Description | Default | Containers | -| :---------------------------------------------------------- | :-------------------------------------------------------------------------------------------------- | :-----------------------------: | :--------------- | -| `MACHINE_LEARNING_MODEL_TTL` | Inactivity time (s) before a model is unloaded (disabled if \<= 0) | `300` | machine learning | -| `MACHINE_LEARNING_MODEL_TTL_POLL_S` | Interval (s) between checks for the model TTL (disabled if \<= 0) | `10` | machine learning | -| `MACHINE_LEARNING_CACHE_FOLDER` | Directory where models are downloaded | `/cache` | machine learning | -| `MACHINE_LEARNING_REQUEST_THREADS`\*1 | Thread count of the request thread pool (disabled if \<= 0) | number of CPU cores | machine learning | -| `MACHINE_LEARNING_MODEL_INTER_OP_THREADS` | Number of parallel model operations | `1` | machine learning | -| `MACHINE_LEARNING_MODEL_INTRA_OP_THREADS` | Number of threads for each model operation | `2` | machine learning | -| `MACHINE_LEARNING_WORKERS`\*2 | Number of worker processes to spawn | `1` | machine learning | -| `MACHINE_LEARNING_HTTP_KEEPALIVE_TIMEOUT_S`\*3 | HTTP Keep-alive time in seconds | `2` | machine learning | -| `MACHINE_LEARNING_WORKER_TIMEOUT` | Maximum time (s) of unresponsiveness before a worker is killed | `120` (`300` if using OpenVINO) | machine learning | -| `MACHINE_LEARNING_PRELOAD__CLIP__TEXTUAL` | Comma-separated list of (textual) CLIP model(s) to preload and cache | | machine learning | -| `MACHINE_LEARNING_PRELOAD__CLIP__VISUAL` | Comma-separated list of (visual) CLIP model(s) to preload and cache | | machine learning | -| `MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION__RECOGNITION` | Comma-separated list of (recognition) facial recognition model(s) to preload and cache | | machine learning | -| `MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION__DETECTION` | Comma-separated list of (detection) facial recognition model(s) to preload and cache | | machine learning | -| `MACHINE_LEARNING_ANN` | Enable ARM-NN hardware acceleration if supported | `True` | machine learning | -| `MACHINE_LEARNING_ANN_FP16_TURBO` | Execute operations in FP16 precision: increasing speed, reducing precision (applies only to ARM-NN) | `False` | machine learning | -| `MACHINE_LEARNING_ANN_TUNING_LEVEL` | ARM-NN GPU tuning level (1: rapid, 2: normal, 3: exhaustive) | `2` | machine learning | -| `MACHINE_LEARNING_DEVICE_IDS`\*4 | Device IDs to use in multi-GPU environments | `0` | machine learning | -| `MACHINE_LEARNING_MAX_BATCH_SIZE__FACIAL_RECOGNITION` | Set the maximum number of faces that will be processed at once by the facial recognition model | None (`1` if using OpenVINO) | machine learning | -| `MACHINE_LEARNING_RKNN` | Enable RKNN hardware acceleration if supported | `True` | machine learning | -| `MACHINE_LEARNING_RKNN_THREADS` | How many threads of RKNN runtime should be spinned up while inferencing. | `1` | machine learning | -| `MACHINE_LEARNING_MODEL_ARENA` | Pre-allocates CPU memory to avoid memory fragmentation | true | machine learning | +| Variable | Description | Default | Containers | +| :---------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----------------------------: | :--------------- | +| `MACHINE_LEARNING_MODEL_TTL` | Inactivity time (s) before a model is unloaded (disabled if \<= 0) | `300` | machine learning | +| `MACHINE_LEARNING_MODEL_TTL_POLL_S` | Interval (s) between checks for the model TTL (disabled if \<= 0) | `10` | machine learning | +| `MACHINE_LEARNING_CACHE_FOLDER` | Directory where models are downloaded | `/cache` | machine learning | +| `MACHINE_LEARNING_REQUEST_THREADS`\*1 | Thread count of the request thread pool (disabled if \<= 0) | number of CPU cores | machine learning | +| `MACHINE_LEARNING_MODEL_INTER_OP_THREADS` | Number of parallel model operations | `1` | machine learning | +| `MACHINE_LEARNING_MODEL_INTRA_OP_THREADS` | Number of threads for each model operation | `2` | machine learning | +| `MACHINE_LEARNING_WORKERS`\*2 | Number of worker processes to spawn | `1` | machine learning | +| `MACHINE_LEARNING_HTTP_KEEPALIVE_TIMEOUT_S`\*3 | HTTP Keep-alive time in seconds | `2` | machine learning | +| `MACHINE_LEARNING_WORKER_TIMEOUT` | Maximum time (s) of unresponsiveness before a worker is killed | `120` (`300` if using OpenVINO) | machine learning | +| `MACHINE_LEARNING_PRELOAD__CLIP__TEXTUAL` | Comma-separated list of (textual) CLIP model(s) to preload and cache | | machine learning | +| `MACHINE_LEARNING_PRELOAD__CLIP__VISUAL` | Comma-separated list of (visual) CLIP model(s) to preload and cache | | machine learning | +| `MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION__RECOGNITION` | Comma-separated list of (recognition) facial recognition model(s) to preload and cache | | machine learning | +| `MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION__DETECTION` | Comma-separated list of (detection) facial recognition model(s) to preload and cache | | machine learning | +| `MACHINE_LEARNING_ANN` | Enable ARM-NN hardware acceleration if supported | `True` | machine learning | +| `MACHINE_LEARNING_ANN_FP16_TURBO` | Execute operations in FP16 precision: increasing speed, reducing precision (applies only to ARM-NN) | `False` | machine learning | +| `MACHINE_LEARNING_ANN_TUNING_LEVEL` | ARM-NN GPU tuning level (1: rapid, 2: normal, 3: exhaustive) | `2` | machine learning | +| `MACHINE_LEARNING_DEVICE_IDS`\*4 | Device IDs to use in multi-GPU environments | `0` | machine learning | +| `MACHINE_LEARNING_MAX_BATCH_SIZE__FACIAL_RECOGNITION` | Set the maximum number of faces that will be processed at once by the facial recognition model | None (`1` if using OpenVINO) | machine learning | +| `MACHINE_LEARNING_MAX_BATCH_SIZE__OCR` | Set the maximum number of boxes that will be processed at once by the OCR model | `6` | machine learning | +| `MACHINE_LEARNING_RKNN` | Enable RKNN hardware acceleration if supported | `True` | machine learning | +| `MACHINE_LEARNING_RKNN_THREADS` | How many threads of RKNN runtime should be spun up while inferencing. | `1` | machine learning | +| `MACHINE_LEARNING_MODEL_ARENA` | Pre-allocates CPU memory to avoid memory fragmentation | true | machine learning | +| `MACHINE_LEARNING_OPENVINO_PRECISION` | If set to FP16, uses half-precision floating-point operations for faster inference with reduced accuracy (one of [`FP16`, `FP32`], applies only to OpenVINO) | `FP32` | machine learning | \*1: It is recommended to begin with this parameter when changing the concurrency levels of the machine learning service and then tune the other ones. diff --git a/docs/mise.toml b/docs/mise.toml new file mode 100644 index 0000000000..4ffb7d5cce --- /dev/null +++ b/docs/mise.toml @@ -0,0 +1,25 @@ +[tasks.install] +run = "pnpm install --filter documentation --frozen-lockfile" + +[tasks.start] +env._.path = "./node_modules/.bin" +run = "docusaurus --port 3005" + +[tasks.build] +env._.path = "./node_modules/.bin" +run = [ + "jq -c < ../open-api/immich-openapi-specs.json > ./static/openapi.json || exit 0", + "docusaurus build", +] + +[tasks.preview] +env._.path = "./node_modules/.bin" +run = "docusaurus serve" + +[tasks.format] +env._.path = "./node_modules/.bin" +run = "prettier --check ." + +[tasks."format-fix"] +env._.path = "./node_modules/.bin" +run = "prettier --write ." diff --git a/docs/static/archived-versions.json b/docs/static/archived-versions.json index 8e4ad4c12a..6affb532c9 100644 --- a/docs/static/archived-versions.json +++ b/docs/static/archived-versions.json @@ -1,4 +1,16 @@ [ + { + "label": "v2.2.3", + "url": "https://docs.v2.2.3.archive.immich.app" + }, + { + "label": "v2.2.2", + "url": "https://docs.v2.2.2.archive.immich.app" + }, + { + "label": "v2.2.1", + "url": "https://docs.v2.2.1.archive.immich.app" + }, { "label": "v2.2.0", "url": "https://docs.v2.2.0.archive.immich.app" diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index 9aef2288f6..3d62c8a34a 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -35,7 +35,7 @@ services: - 2285:2285 redis: - image: redis:6.2-alpine@sha256:77697a75da9f94e9357b61fcaf8345f69e3d9d32e9d15032c8415c21263977dc + image: redis:6.2-alpine@sha256:37e002448575b32a599109664107e374c8709546905c372a34d64919043b9ceb database: image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0@sha256:6f3e9d2c2177af16c2988ff71425d79d89ca630ec2f9c8db03209ab716542338 diff --git a/e2e/mise.toml b/e2e/mise.toml new file mode 100644 index 0000000000..c298115e40 --- /dev/null +++ b/e2e/mise.toml @@ -0,0 +1,29 @@ +[tasks.install] +run = "pnpm install --filter immich-e2e --frozen-lockfile" + +[tasks.test] +env._.path = "./node_modules/.bin" +run = "vitest --run" + +[tasks."test-web"] +env._.path = "./node_modules/.bin" +run = "playwright test" + +[tasks.format] +env._.path = "./node_modules/.bin" +run = "prettier --check ." + +[tasks."format-fix"] +env._.path = "./node_modules/.bin" +run = "prettier --write ." + +[tasks.lint] +env._.path = "./node_modules/.bin" +run = "eslint \"src/**/*.ts\" --max-warnings 0" + +[tasks."lint-fix"] +run = { task = "lint --fix" } + +[tasks.check] +env._.path = "./node_modules/.bin" +run = "tsc --noEmit" diff --git a/e2e/package.json b/e2e/package.json index d6c875ad72..84e1823e0c 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -1,6 +1,6 @@ { "name": "immich-e2e", - "version": "2.2.0", + "version": "2.2.3", "description": "", "main": "index.js", "type": "module", @@ -25,7 +25,7 @@ "@playwright/test": "^1.44.1", "@socket.io/component-emitter": "^3.1.2", "@types/luxon": "^3.4.2", - "@types/node": "^22.18.12", + "@types/node": "^22.19.0", "@types/oidc-provider": "^9.0.0", "@types/pg": "^8.15.1", "@types/pngjs": "^6.0.4", diff --git a/e2e/src/api/specs/asset.e2e-spec.ts b/e2e/src/api/specs/asset.e2e-spec.ts index 5c30ff5cbe..ab3252c40b 100644 --- a/e2e/src/api/specs/asset.e2e-spec.ts +++ b/e2e/src/api/specs/asset.e2e-spec.ts @@ -15,7 +15,6 @@ import { DateTime } from 'luxon'; import { randomBytes } from 'node:crypto'; import { readFile, writeFile } from 'node:fs/promises'; import { basename, join } from 'node:path'; -import sharp from 'sharp'; import { Socket } from 'socket.io-client'; import { createUserDto, uuidDto } from 'src/fixtures'; import { makeRandomImage } from 'src/generators'; @@ -41,40 +40,6 @@ const today = DateTime.fromObject({ }) as DateTime; const yesterday = today.minus({ days: 1 }); -const createTestImageWithExif = async (filename: string, exifData: Record) => { - // Generate unique color to ensure different checksums for each image - const r = Math.floor(Math.random() * 256); - const g = Math.floor(Math.random() * 256); - const b = Math.floor(Math.random() * 256); - - // Create a 100x100 solid color JPEG using Sharp - const imageBytes = await sharp({ - create: { - width: 100, - height: 100, - channels: 3, - background: { r, g, b }, - }, - }) - .jpeg({ quality: 90 }) - .toBuffer(); - - // Add random suffix to filename to avoid collisions - const uniqueFilename = filename.replace('.jpg', `-${randomBytes(4).toString('hex')}.jpg`); - const filepath = join(tempDir, uniqueFilename); - await writeFile(filepath, imageBytes); - - // Filter out undefined values before writing EXIF - const cleanExifData = Object.fromEntries(Object.entries(exifData).filter(([, value]) => value !== undefined)); - - await exiftool.write(filepath, cleanExifData); - - // Re-read the image bytes after EXIF has been written - const finalImageBytes = await readFile(filepath); - - return { filepath, imageBytes: finalImageBytes, filename: uniqueFilename }; -}; - describe('/asset', () => { let admin: LoginResponseDto; let websocket: Socket; @@ -1249,411 +1214,6 @@ describe('/asset', () => { }); }); - describe('EXIF metadata extraction', () => { - describe('Additional date tag extraction', () => { - describe('Date-time vs time-only tag handling', () => { - it('should fall back to file timestamps when only time-only tags are available', async () => { - const { imageBytes, filename } = await createTestImageWithExif('time-only-fallback.jpg', { - TimeCreated: '2023:11:15 14:30:00', // Time-only tag, should not be used for dateTimeOriginal - // Exclude all date-time tags to force fallback to file timestamps - SubSecDateTimeOriginal: undefined, - DateTimeOriginal: undefined, - SubSecCreateDate: undefined, - SubSecMediaCreateDate: undefined, - CreateDate: undefined, - MediaCreateDate: undefined, - CreationDate: undefined, - DateTimeCreated: undefined, - GPSDateTime: undefined, - DateTimeUTC: undefined, - SonyDateTime2: undefined, - GPSDateStamp: undefined, - }); - - const oldDate = new Date('2020-01-01T00:00:00.000Z'); - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - fileCreatedAt: oldDate.toISOString(), - fileModifiedAt: oldDate.toISOString(), - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - // Should fall back to file timestamps, which we set to 2020-01-01 - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2020-01-01T00:00:00.000Z').getTime(), - ); - }); - - it('should prefer DateTimeOriginal over time-only tags', async () => { - const { imageBytes, filename } = await createTestImageWithExif('datetime-over-time.jpg', { - DateTimeOriginal: '2023:10:10 10:00:00', // Should be preferred - TimeCreated: '2023:11:15 14:30:00', // Should be ignored (time-only) - }); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - // Should use DateTimeOriginal, not TimeCreated - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2023-10-10T10:00:00.000Z').getTime(), - ); - }); - }); - - describe('GPSDateTime tag extraction', () => { - it('should extract GPSDateTime with GPS coordinates', async () => { - const { imageBytes, filename } = await createTestImageWithExif('gps-datetime.jpg', { - GPSDateTime: '2023:11:15 12:30:00Z', - GPSLatitude: 37.7749, - GPSLongitude: -122.4194, - // Exclude other date tags - SubSecDateTimeOriginal: undefined, - DateTimeOriginal: undefined, - SubSecCreateDate: undefined, - SubSecMediaCreateDate: undefined, - CreateDate: undefined, - MediaCreateDate: undefined, - CreationDate: undefined, - DateTimeCreated: undefined, - TimeCreated: undefined, - }); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - expect(assetInfo.exifInfo?.latitude).toBeCloseTo(37.7749, 4); - expect(assetInfo.exifInfo?.longitude).toBeCloseTo(-122.4194, 4); - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2023-11-15T12:30:00.000Z').getTime(), - ); - }); - }); - - describe('CreateDate tag extraction', () => { - it('should extract CreateDate when available', async () => { - const { imageBytes, filename } = await createTestImageWithExif('create-date.jpg', { - CreateDate: '2023:11:15 10:30:00', - // Exclude other higher priority date tags - SubSecDateTimeOriginal: undefined, - DateTimeOriginal: undefined, - SubSecCreateDate: undefined, - SubSecMediaCreateDate: undefined, - MediaCreateDate: undefined, - CreationDate: undefined, - DateTimeCreated: undefined, - TimeCreated: undefined, - GPSDateTime: undefined, - }); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2023-11-15T10:30:00.000Z').getTime(), - ); - }); - }); - - describe('GPSDateStamp tag extraction', () => { - it('should fall back to file timestamps when only date-only tags are available', async () => { - const { imageBytes, filename } = await createTestImageWithExif('gps-datestamp.jpg', { - GPSDateStamp: '2023:11:15', // Date-only tag, should not be used for dateTimeOriginal - // Note: NOT including GPSTimeStamp to avoid automatic GPSDateTime creation - GPSLatitude: 51.5074, - GPSLongitude: -0.1278, - // Explicitly exclude all testable date-time tags to force fallback to file timestamps - DateTimeOriginal: undefined, - CreateDate: undefined, - CreationDate: undefined, - GPSDateTime: undefined, - }); - - const oldDate = new Date('2020-01-01T00:00:00.000Z'); - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - fileCreatedAt: oldDate.toISOString(), - fileModifiedAt: oldDate.toISOString(), - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - expect(assetInfo.exifInfo?.latitude).toBeCloseTo(51.5074, 4); - expect(assetInfo.exifInfo?.longitude).toBeCloseTo(-0.1278, 4); - // Should fall back to file timestamps, which we set to 2020-01-01 - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2020-01-01T00:00:00.000Z').getTime(), - ); - }); - }); - - /* - * NOTE: The following EXIF date tags are NOT effectively usable with JPEG test files: - * - * NOT WRITABLE to JPEG: - * - MediaCreateDate: Can be read from video files but not written to JPEG - * - DateTimeCreated: Read-only tag in JPEG format - * - DateTimeUTC: Cannot be written to JPEG files - * - SonyDateTime2: Proprietary Sony tag, not writable to JPEG - * - SubSecMediaCreateDate: Tag not defined for JPEG format - * - SourceImageCreateTime: Non-standard insta360 tag, not writable to JPEG - * - * WRITABLE but NOT READABLE from JPEG: - * - SubSecDateTimeOriginal: Can be written but not read back from JPEG - * - SubSecCreateDate: Can be written but not read back from JPEG - * - * EFFECTIVELY TESTABLE TAGS (writable and readable): - * - DateTimeOriginal ✓ - * - CreateDate ✓ - * - CreationDate ✓ - * - GPSDateTime ✓ - * - * The metadata service correctly handles non-readable tags and will fall back to - * file timestamps when only non-readable tags are present. - */ - - describe('Date tag priority order', () => { - it('should respect the complete date tag priority order', async () => { - // Test cases using only EFFECTIVELY TESTABLE tags (writable AND readable from JPEG) - const testCases = [ - { - name: 'DateTimeOriginal has highest priority among testable tags', - exifData: { - DateTimeOriginal: '2023:04:04 04:00:00', // TESTABLE - highest priority among readable tags - CreateDate: '2023:05:05 05:00:00', // TESTABLE - CreationDate: '2023:07:07 07:00:00', // TESTABLE - GPSDateTime: '2023:10:10 10:00:00', // TESTABLE - }, - expectedDate: '2023-04-04T04:00:00.000Z', - }, - { - name: 'CreationDate when DateTimeOriginal missing', - exifData: { - CreationDate: '2023:05:05 05:00:00', // TESTABLE - CreateDate: '2023:07:07 07:00:00', // TESTABLE - GPSDateTime: '2023:10:10 10:00:00', // TESTABLE - }, - expectedDate: '2023-05-05T05:00:00.000Z', - }, - { - name: 'CreationDate when standard EXIF tags missing', - exifData: { - CreationDate: '2023:07:07 07:00:00', // TESTABLE - GPSDateTime: '2023:10:10 10:00:00', // TESTABLE - }, - expectedDate: '2023-07-07T07:00:00.000Z', - }, - { - name: 'GPSDateTime when no other testable date tags present', - exifData: { - GPSDateTime: '2023:10:10 10:00:00', // TESTABLE - Make: 'SONY', - }, - expectedDate: '2023-10-10T10:00:00.000Z', - }, - ]; - - for (const testCase of testCases) { - const { imageBytes, filename } = await createTestImageWithExif( - `${testCase.name.replaceAll(/\s+/g, '-').toLowerCase()}.jpg`, - testCase.exifData, - ); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal, `Failed for: ${testCase.name}`).toBeDefined(); - expect( - new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime(), - `Date mismatch for: ${testCase.name}`, - ).toBe(new Date(testCase.expectedDate).getTime()); - } - }); - }); - - describe('Edge cases for date tag handling', () => { - it('should fall back to file timestamps with GPSDateStamp alone', async () => { - const { imageBytes, filename } = await createTestImageWithExif('gps-datestamp-only.jpg', { - GPSDateStamp: '2023:08:08', // Date-only tag, should not be used for dateTimeOriginal - // Intentionally no GPSTimeStamp - // Exclude all other date tags - SubSecDateTimeOriginal: undefined, - DateTimeOriginal: undefined, - SubSecCreateDate: undefined, - SubSecMediaCreateDate: undefined, - CreateDate: undefined, - MediaCreateDate: undefined, - CreationDate: undefined, - DateTimeCreated: undefined, - TimeCreated: undefined, - GPSDateTime: undefined, - DateTimeUTC: undefined, - }); - - const oldDate = new Date('2020-01-01T00:00:00.000Z'); - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - fileCreatedAt: oldDate.toISOString(), - fileModifiedAt: oldDate.toISOString(), - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - // Should fall back to file timestamps, which we set to 2020-01-01 - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2020-01-01T00:00:00.000Z').getTime(), - ); - }); - - it('should handle all testable date tags present to verify complete priority order', async () => { - const { imageBytes, filename } = await createTestImageWithExif('all-testable-date-tags.jpg', { - // All TESTABLE date tags to JPEG format (writable AND readable) - DateTimeOriginal: '2023:04:04 04:00:00', // TESTABLE - highest priority among readable tags - CreateDate: '2023:05:05 05:00:00', // TESTABLE - CreationDate: '2023:07:07 07:00:00', // TESTABLE - GPSDateTime: '2023:10:10 10:00:00', // TESTABLE - // Note: Excluded non-testable tags: - // SubSec tags: writable but not readable from JPEG - // Non-writable tags: MediaCreateDate, DateTimeCreated, DateTimeUTC, SonyDateTime2, etc. - // Time-only/date-only tags: already excluded from EXIF_DATE_TAGS - }); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - // Should use DateTimeOriginal as it has the highest priority among testable tags - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2023-04-04T04:00:00.000Z').getTime(), - ); - }); - - it('should use CreationDate when SubSec tags are missing', async () => { - const { imageBytes, filename } = await createTestImageWithExif('creation-date-priority.jpg', { - CreationDate: '2023:07:07 07:00:00', // WRITABLE - GPSDateTime: '2023:10:10 10:00:00', // WRITABLE - // Note: DateTimeCreated, DateTimeUTC, SonyDateTime2 are NOT writable to JPEG - // Note: TimeCreated and GPSDateStamp are excluded from EXIF_DATE_TAGS (time-only/date-only) - // Exclude SubSec and standard EXIF tags - SubSecDateTimeOriginal: undefined, - DateTimeOriginal: undefined, - SubSecCreateDate: undefined, - CreateDate: undefined, - }); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - // Should use CreationDate when available - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2023-07-07T07:00:00.000Z').getTime(), - ); - }); - - it('should skip invalid date formats and use next valid tag', async () => { - const { imageBytes, filename } = await createTestImageWithExif('invalid-date-handling.jpg', { - // Note: Testing invalid date handling with only WRITABLE tags - GPSDateTime: '2023:10:10 10:00:00', // WRITABLE - Valid date - CreationDate: '2023:13:13 13:00:00', // WRITABLE - Valid date - // Note: TimeCreated excluded (time-only), DateTimeCreated not writable to JPEG - // Exclude other date tags - SubSecDateTimeOriginal: undefined, - DateTimeOriginal: undefined, - SubSecCreateDate: undefined, - CreateDate: undefined, - }); - - const asset = await utils.createAsset(admin.accessToken, { - assetData: { - filename, - bytes: imageBytes, - }, - }); - - await utils.waitForWebsocketEvent({ event: 'assetUpload', id: asset.id }); - - const assetInfo = await getAssetInfo({ id: asset.id }, { headers: asBearerAuth(admin.accessToken) }); - - expect(assetInfo.exifInfo?.dateTimeOriginal).toBeDefined(); - // Should skip invalid dates and use the first valid one (GPSDateTime) - expect(new Date(assetInfo.exifInfo!.dateTimeOriginal!).getTime()).toBe( - new Date('2023-10-10T10:00:00.000Z').getTime(), - ); - }); - }); - }); - }); - describe('POST /assets/exist', () => { it('ignores invalid deviceAssetIds', async () => { const response = await utils.checkExistingAssets(user1.accessToken, { diff --git a/e2e/src/generate-date-tag-test-images.ts b/e2e/src/generate-date-tag-test-images.ts deleted file mode 100644 index 34cc956416..0000000000 --- a/e2e/src/generate-date-tag-test-images.ts +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env node - -/** - * Script to generate test images with additional EXIF date tags - * This creates actual JPEG images with embedded metadata for testing - * Images are generated into e2e/test-assets/metadata/dates/ - */ - -import { execSync } from 'node:child_process'; -import { writeFileSync } from 'node:fs'; -import { dirname, join } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import sharp from 'sharp'; - -interface TestImage { - filename: string; - description: string; - exifTags: Record; -} - -const testImages: TestImage[] = [ - { - filename: 'time-created.jpg', - description: 'Image with TimeCreated tag', - exifTags: { - TimeCreated: '2023:11:15 14:30:00', - Make: 'Canon', - Model: 'EOS R5', - }, - }, - { - filename: 'gps-datetime.jpg', - description: 'Image with GPSDateTime and coordinates', - exifTags: { - GPSDateTime: '2023:11:15 12:30:00Z', - GPSLatitude: '37.7749', - GPSLongitude: '-122.4194', - GPSLatitudeRef: 'N', - GPSLongitudeRef: 'W', - }, - }, - { - filename: 'datetime-utc.jpg', - description: 'Image with DateTimeUTC tag', - exifTags: { - DateTimeUTC: '2023:11:15 10:30:00', - Make: 'Nikon', - Model: 'D850', - }, - }, - { - filename: 'gps-datestamp.jpg', - description: 'Image with GPSDateStamp and GPSTimeStamp', - exifTags: { - GPSDateStamp: '2023:11:15', - GPSTimeStamp: '08:30:00', - GPSLatitude: '51.5074', - GPSLongitude: '-0.1278', - GPSLatitudeRef: 'N', - GPSLongitudeRef: 'W', - }, - }, - { - filename: 'sony-datetime2.jpg', - description: 'Sony camera image with SonyDateTime2 tag', - exifTags: { - SonyDateTime2: '2023:11:15 06:30:00', - Make: 'SONY', - Model: 'ILCE-7RM5', - }, - }, - { - filename: 'date-priority-test.jpg', - description: 'Image with multiple date tags to test priority', - exifTags: { - SubSecDateTimeOriginal: '2023:01:01 01:00:00', - DateTimeOriginal: '2023:02:02 02:00:00', - SubSecCreateDate: '2023:03:03 03:00:00', - CreateDate: '2023:04:04 04:00:00', - CreationDate: '2023:05:05 05:00:00', - DateTimeCreated: '2023:06:06 06:00:00', - TimeCreated: '2023:07:07 07:00:00', - GPSDateTime: '2023:08:08 08:00:00', - DateTimeUTC: '2023:09:09 09:00:00', - GPSDateStamp: '2023:10:10', - SonyDateTime2: '2023:11:11 11:00:00', - }, - }, - { - filename: 'new-tags-only.jpg', - description: 'Image with only additional date tags (no standard tags)', - exifTags: { - TimeCreated: '2023:12:01 15:45:30', - GPSDateTime: '2023:12:01 13:45:30Z', - DateTimeUTC: '2023:12:01 13:45:30', - GPSDateStamp: '2023:12:01', - SonyDateTime2: '2023:12:01 08:45:30', - GPSLatitude: '40.7128', - GPSLongitude: '-74.0060', - GPSLatitudeRef: 'N', - GPSLongitudeRef: 'W', - }, - }, -]; - -const generateTestImages = async (): Promise => { - // Target directory: e2e/test-assets/metadata/dates/ - // Current file is in: e2e/src/ - const __filename = fileURLToPath(import.meta.url); - const __dirname = dirname(__filename); - const targetDir = join(__dirname, '..', 'test-assets', 'metadata', 'dates'); - - console.log('Generating test images with additional EXIF date tags...'); - console.log(`Target directory: ${targetDir}`); - - for (const image of testImages) { - try { - const imagePath = join(targetDir, image.filename); - - // Create unique JPEG file using Sharp - const r = Math.floor(Math.random() * 256); - const g = Math.floor(Math.random() * 256); - const b = Math.floor(Math.random() * 256); - - const jpegData = await sharp({ - create: { - width: 100, - height: 100, - channels: 3, - background: { r, g, b }, - }, - }) - .jpeg({ quality: 90 }) - .toBuffer(); - - writeFileSync(imagePath, jpegData); - - // Build exiftool command to add EXIF data - const exifArgs = Object.entries(image.exifTags) - .map(([tag, value]) => `-${tag}="${value}"`) - .join(' '); - - const command = `exiftool ${exifArgs} -overwrite_original "${imagePath}"`; - - console.log(`Creating ${image.filename}: ${image.description}`); - execSync(command, { stdio: 'pipe' }); - - // Verify the tags were written - const verifyCommand = `exiftool -json "${imagePath}"`; - const result = execSync(verifyCommand, { encoding: 'utf8' }); - const metadata = JSON.parse(result)[0]; - - console.log(` ✓ Created with ${Object.keys(image.exifTags).length} EXIF tags`); - - // Log first date tag found for verification - const firstDateTag = Object.keys(image.exifTags).find( - (tag) => tag.includes('Date') || tag.includes('Time') || tag.includes('Created'), - ); - if (firstDateTag && metadata[firstDateTag]) { - console.log(` ✓ Verified ${firstDateTag}: ${metadata[firstDateTag]}`); - } - } catch (error) { - console.error(`Failed to create ${image.filename}:`, (error as Error).message); - } - } - - console.log('\nTest image generation complete!'); - console.log('Files created in:', targetDir); - console.log('\nTo test these images:'); - console.log(`cd ${targetDir} && exiftool -time:all -gps:all *.jpg`); -}; - -export { generateTestImages }; - -// Run the generator if this file is executed directly -if (import.meta.url === `file://${process.argv[1]}`) { - generateTestImages().catch(console.error); -} diff --git a/e2e/src/web/specs/user-admin.e2e-spec.ts b/e2e/src/web/specs/user-admin.e2e-spec.ts index 3d64e47aef..611a1b3dec 100644 --- a/e2e/src/web/specs/user-admin.e2e-spec.ts +++ b/e2e/src/web/specs/user-admin.e2e-spec.ts @@ -52,7 +52,7 @@ test.describe('User Administration', () => { await page.goto(`/admin/users/${user.userId}`); - await page.getByRole('button', { name: 'Edit user' }).click(); + await page.getByRole('button', { name: 'Edit' }).click(); await expect(page.getByLabel('Admin User')).not.toBeChecked(); await page.getByText('Admin User').click(); await expect(page.getByLabel('Admin User')).toBeChecked(); @@ -77,7 +77,7 @@ test.describe('User Administration', () => { await page.goto(`/admin/users/${user.userId}`); - await page.getByRole('button', { name: 'Edit user' }).click(); + await page.getByRole('button', { name: 'Edit' }).click(); await expect(page.getByLabel('Admin User')).toBeChecked(); await page.getByText('Admin User').click(); await expect(page.getByLabel('Admin User')).not.toBeChecked(); diff --git a/e2e/test-assets b/e2e/test-assets index 37f60ea537..163c251744 160000 --- a/e2e/test-assets +++ b/e2e/test-assets @@ -1 +1 @@ -Subproject commit 37f60ea537c0228f5f92e4f42dc42f0bb39a6d7f +Subproject commit 163c251744e0a35d7ecfd02682452043f149fc2b diff --git a/i18n/da.json b/i18n/da.json index 84109939bf..5bb67dd83d 100644 --- a/i18n/da.json +++ b/i18n/da.json @@ -1716,6 +1716,7 @@ "running": "Kører", "save": "Gem", "save_to_gallery": "Gem til galleri", + "saved": "Gemt", "saved_api_key": "Gemt API-nøgle", "saved_profile": "Gemte profil", "saved_settings": "Gemte indstillinger", diff --git a/i18n/de.json b/i18n/de.json index ce0f8a2966..0cae9c0762 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -155,12 +155,15 @@ "machine_learning_min_recognized_faces": "Mindestens erkannte Gesichter", "machine_learning_min_recognized_faces_description": "Die Mindestanzahl von erkannten Gesichtern, damit eine Person erstellt werden kann. Eine ErhÃļhung dieses Wertes macht die Gesichtserkennung präziser, erhÃļht aber die Wahrscheinlichkeit, dass ein Gesicht nicht zu einer Person zugeordnet wird.", "machine_learning_ocr": "OCR", - "machine_learning_ocr_description": "Maschinen lernen nutzen um Texte in Bildern zu erkennen", + "machine_learning_ocr_description": "Maschinelles Lernen nutzen um Texte in Bildern zu erkennen", "machine_learning_ocr_enabled": "OCR aktivieren", "machine_learning_ocr_enabled_description": "Wenn deaktiviert, werden die Bilder nicht von der Texterkennung bearbeitet.", "machine_learning_ocr_max_resolution": "Maximale AuflÃļsung", "machine_learning_ocr_max_resolution_description": "Vorschauen Ãŧber dieser AuflÃļsung werden unter Beibehaltung des Seitenverhältnisses verkleinert. HÃļhere Werte sind genauer, benÃļtigen jedoch mehr Zeit fÃŧr die Verarbeitung und verbrauchen mehr Speicher.", "machine_learning_ocr_min_detection_score": "Minimaler Erkennungswert", + "machine_learning_ocr_min_detection_score_description": "Minimale Konfidenzrate fÃŧr die Texterkennung von 0–1. Niedrigere Werte fÃŧhren dazu, dass mehr Text erkannt wird, kÃļnnen jedoch zu falsch-positiven Ergebnissen fÃŧhren.", + "machine_learning_ocr_min_recognition_score": "Minimale Erkennungsrate", + "machine_learning_ocr_min_score_recognition_description": "Minimale Konfidenzrate fÃŧr die Erkennung von erkanntem Text von 0–1. Niedrigere Werte fÃŧhren dazu, dass mehr Text erkannt wird, kÃļnnen jedoch zu falsch-positiven Ergebnissen fÃŧhren.", "machine_learning_ocr_model": "OCR Modell", "machine_learning_ocr_model_description": "Server Modelle sind genauer als mobile Modelle, brauchen aber länger zur Verarbeitung und brauchen mehr Speicher.", "machine_learning_settings": "Einstellungen fÃŧr maschinelles Lernen", @@ -254,7 +257,7 @@ "oauth_storage_quota_default_description": "Kontingent in GiB, das verwendet werden soll, wenn keines Ãŧbermittelt wird.", "oauth_timeout": "ZeitÃŧberschreitung bei Anfrage", "oauth_timeout_description": "ZeitÃŧberschreitung fÃŧr Anfragen in Millisekunden", - "ocr_job_description": "Verwende Machine Learning zur Ernennung von Text in Bildern", + "ocr_job_description": "Verwende Machine Learning zur Erkennung von Text in Bildern", "password_enable_description": "Mit E-Mail und Passwort anmelden", "password_settings": "Passwort-Anmeldung", "password_settings_description": "Passwort-Anmeldeeinstellungen verwalten", @@ -1352,7 +1355,7 @@ "memories_check_back_tomorrow": "Schau morgen wieder vorbei fÃŧr weitere Erinnerungen", "memories_setting_description": "Verwalte, was du in deinen Erinnerungen siehst", "memories_start_over": "Erneut beginnen", - "memories_swipe_to_close": "Nach oben Wischen zum schließen", + "memories_swipe_to_close": "Nach oben Wischen zum Schließen", "memory": "Erinnerung", "memory_lane_title": "Foto-Erinnerungen {title}", "menu": "MenÃŧ", @@ -1713,6 +1716,7 @@ "running": "Läuft", "save": "Speichern", "save_to_gallery": "In Galerie speichern", + "saved": "Gespeichert", "saved_api_key": "API-SchlÃŧssel wurde gespeichert", "saved_profile": "Profil gespeichert", "saved_settings": "Einstellungen gespeichert", diff --git a/i18n/en.json b/i18n/en.json index 2daf6187bb..1776add03a 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -479,6 +479,7 @@ "allow_edits": "Allow edits", "allow_public_user_to_download": "Allow public user to download", "allow_public_user_to_upload": "Allow public user to upload", + "allowed": "Allowed", "alt_text_qr_code": "QR code image", "anti_clockwise": "Anti-clockwise", "api_key": "API Key", @@ -1200,6 +1201,8 @@ "import_path": "Import path", "in_albums": "In {count, plural, one {# album} other {# albums}}", "in_archive": "In archive", + "in_year": "In {year}", + "in_year_selector": "In", "include_archived": "Include archived", "include_shared_albums": "Include shared albums", "include_shared_partner_assets": "Include shared partner assets", @@ -1236,6 +1239,7 @@ "language_setting_description": "Select your preferred language", "large_files": "Large Files", "last": "Last", + "last_months": "{count, plural, one {Last month} other {Last # months}}", "last_seen": "Last seen", "latest_version": "Latest Version", "latitude": "Latitude", @@ -1323,6 +1327,10 @@ "maintenance_title": "Temporarily Unavailable", "make": "Make", "manage_geolocation": "Manage location", + "manage_media_access_rationale": "This permission is required for proper handling of moving assets to the trash and restoring them from it.", + "manage_media_access_settings": "Open settings", + "manage_media_access_subtitle": "Allow the Immich app to manage and move media files.", + "manage_media_access_title": "Media Management Access", "manage_shared_links": "Manage shared links", "manage_sharing_with_partners": "Manage sharing with partners", "manage_the_app_settings": "Manage the app settings", @@ -1415,6 +1423,7 @@ "new_pin_code": "New PIN code", "new_pin_code_subtitle": "This is your first time accessing the locked folder. Create a PIN code to securely access this page", "new_timeline": "New Timeline", + "new_update": "New update", "new_user_created": "New user created", "new_version_available": "NEW VERSION AVAILABLE", "newest_first": "Newest first", @@ -1430,6 +1439,7 @@ "no_cast_devices_found": "No cast devices found", "no_checksum_local": "No checksum available - cannot fetch local assets", "no_checksum_remote": "No checksum available - cannot fetch remote asset", + "no_devices": "No authorized devices", "no_duplicates_found": "No duplicates were found.", "no_exif_info_available": "No exif info available", "no_explore_results_message": "Upload more photos to explore your collection.", @@ -1446,6 +1456,7 @@ "no_results_description": "Try a synonym or more general keyword", "no_shared_albums_message": "Create an album to share photos and videos with people in your network", "no_uploads_in_progress": "No uploads in progress", + "not_allowed": "Not allowed", "not_available": "N/A", "not_in_any_album": "Not in any album", "not_selected": "Not selected", @@ -1556,6 +1567,8 @@ "photos_count": "{count, plural, one {{count, number} Photo} other {{count, number} Photos}}", "photos_from_previous_years": "Photos from previous years", "pick_a_location": "Pick a location", + "pick_custom_range": "Custom range", + "pick_date_range": "Select a date range", "pin_code_changed_successfully": "Successfully changed PIN code", "pin_code_reset_successfully": "Successfully reset PIN code", "pin_code_setup_successfully": "Successfully setup a PIN code", @@ -2038,6 +2051,7 @@ "third_party_resources": "Third-Party Resources", "time": "Time", "time_based_memories": "Time-based memories", + "time_based_memories_duration": "Number of seconds to display each image.", "timeline": "Timeline", "timezone": "Timezone", "to_archive": "Archive", diff --git a/i18n/fr.json b/i18n/fr.json index 6c2f979e86..789afffc38 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -157,7 +157,7 @@ "machine_learning_ocr": "OCR", "machine_learning_ocr_description": "Utiliser l'apprentissage automatique pour reconnaÃŽtre le texte dans les images", "machine_learning_ocr_enabled": "Activer la reconnaissance de caractères", - "machine_learning_ocr_enabled_description": "Si dÊsactivÊ, la reconnaissance de texte ne s'appliquera pas aux images", + "machine_learning_ocr_enabled_description": "Si dÊsactivÊ, la reconnaissance de texte ne s'appliquera pas aux images.", "machine_learning_ocr_max_resolution": "RÊsolution maximale", "machine_learning_ocr_max_resolution_description": "Les prÊvisualisations au-dessus de cette rÊsolution seront retaillÊes en conservant leur ratio. Des valeurs plus grandes sont plus prÊcises, mais sont plus lentes et utilisent plus de mÊmoire.", "machine_learning_ocr_min_detection_score": "Score minimum de dÊtection", diff --git a/i18n/hi.json b/i18n/hi.json index d902a34dd8..fb1698c0a2 100644 --- a/i18n/hi.json +++ b/i18n/hi.json @@ -33,6 +33,7 @@ "add_to_albums": "ā¤ā¤•ā¤žā¤§ā¤ŋ⤕ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛āĨ‡", "add_to_albums_count": "ā¤ā¤˛āĨā¤Ŧā¤ŽāĨ‹ā¤‚ ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛āĨ‡ā¤‚ ({count})", "add_to_shared_album": "ā¤ļāĨ‡ā¤¯ā¤° ⤕ā¤ŋā¤ ā¤—ā¤ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛āĨ‡ā¤‚", + "add_upload_to_stack": "⤏āĨā¤ŸāĨˆā¤• ā¤ŽāĨ‡ā¤‚ ⤅ā¤Ē⤞āĨ‹ā¤Ą ⤕⤰āĨ‡ā¤‚", "add_url": "URL ā¤Ąā¤žā¤˛āĨ‡ā¤‚", "added_to_archive": "⤏⤂⤗āĨā¤°ā¤šāĨ€ā¤¤ ⤕⤰ ā¤Ļā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨˆ", "added_to_favorites": "ā¤Ē⤏⤂ā¤ĻāĨ€ā¤Ļā¤ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛ā¤ž ā¤—ā¤¯ā¤ž", @@ -124,6 +125,13 @@ "logging_enable_description": "⤞āĨ‰ā¤—ā¤ŋ⤂⤗ ⤕⤰⤍āĨ‡ ā¤ĻāĨ‡ā¤¨ā¤ž", "logging_level_description": "⤏⤕āĨā¤ˇā¤Ž ā¤šāĨ‹ā¤¨āĨ‡ ā¤Ē⤰, ⤕ā¤ŋ⤏ ⤞āĨ‰ā¤— ⤏āĨā¤¤ā¤° ā¤•ā¤ž ⤉ā¤Ē⤝āĨ‹ā¤— ā¤•ā¤°ā¤¨ā¤ž ā¤šāĨˆāĨ¤", "logging_settings": "⤞āĨ‰ā¤—ā¤ŋ⤂⤗", + "machine_learning_availability_checks": "⤉ā¤Ē⤞ā¤ŦāĨā¤§ā¤¤ā¤ž ā¤œā¤žā¤‚ā¤š", + "machine_learning_availability_checks_description": "⤉ā¤Ē⤞ā¤ŦāĨā¤§ ā¤Žā¤ļāĨ€ā¤¨ ⤞⤰āĨā¤¨ā¤ŋ⤂⤗ ⤏⤰āĨā¤ĩ⤰ ā¤•ā¤ž ⤏āĨā¤ĩā¤šā¤žā¤˛ā¤ŋ⤤ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ā¤Ēā¤¤ā¤ž ā¤˛ā¤—ā¤žā¤ā¤‚ ⤔⤰ ā¤ĒāĨā¤°ā¤žā¤Ĩā¤Žā¤ŋā¤•ā¤¤ā¤ž ā¤ĻāĨ‡ā¤‚", + "machine_learning_availability_checks_enabled": "⤉ā¤Ē⤞ā¤ŦāĨā¤§ā¤¤ā¤ž ā¤œā¤žā¤‚ā¤š ⤏⤕āĨā¤ˇā¤Ž ⤕⤰āĨ‡ā¤‚", + "machine_learning_availability_checks_interval": "ā¤…ā¤‚ā¤¤ā¤°ā¤žā¤˛ ⤕āĨ€ ā¤œā¤žā¤ā¤š ⤕⤰āĨ‡ā¤‚", + "machine_learning_availability_checks_interval_description": "⤉ā¤Ē⤞ā¤ŦāĨā¤§ā¤¤ā¤ž ā¤œā¤žā¤‚ā¤š ⤕āĨ‡ ā¤ŦāĨ€ā¤š ā¤Žā¤ŋ⤞āĨ€ā¤¸āĨ‡ā¤•āĨ‡ā¤‚ā¤Ą ā¤ŽāĨ‡ā¤‚ ā¤…ā¤‚ā¤¤ā¤°ā¤žā¤˛", + "machine_learning_availability_checks_timeout": "⤅⤍āĨā¤°āĨ‹ā¤§ ā¤¸ā¤Žā¤¯ā¤Ŧā¤žā¤šāĨā¤¯ ā¤šāĨā¤†", + "machine_learning_availability_checks_timeout_description": "⤉ā¤Ē⤞ā¤ŦāĨā¤§ā¤¤ā¤ž ā¤œā¤žā¤‚ā¤š ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Žā¤ŋ⤞āĨ€ā¤¸āĨ‡ā¤•ā¤‚ā¤Ą ā¤ŽāĨ‡ā¤‚ ā¤¸ā¤Žā¤¯ā¤Ŧā¤žā¤šāĨā¤¯ ā¤…ā¤‚ā¤¤ā¤°ā¤žā¤˛", "machine_learning_clip_model": "⤕āĨā¤˛ā¤ŋā¤Ē ā¤ŽāĨ‰ā¤Ąā¤˛", "machine_learning_clip_model_description": "CLIP ā¤ŽāĨ‰ā¤Ąā¤˛ ā¤•ā¤ž ā¤¨ā¤žā¤Ž ā¤¯ā¤šā¤žā¤‚ ⤏āĨ‚ā¤šāĨ€ā¤Ŧā¤ĻāĨā¤§ ā¤šāĨˆāĨ¤ ⤧āĨā¤¯ā¤žā¤¨ ā¤ĻāĨ‡ā¤‚ ⤕ā¤ŋ ā¤ŽāĨ‰ā¤Ąā¤˛ ā¤Ŧā¤Ļ⤞⤍āĨ‡ ā¤Ē⤰ ⤆ā¤Ē⤕āĨ‹ ⤏⤭āĨ€ ⤛ā¤ĩā¤ŋ⤝āĨ‹ā¤‚ ⤕āĨ‡ ⤞ā¤ŋā¤ '⤏āĨā¤Žā¤žā¤°āĨā¤Ÿ ⤏⤰āĨā¤š' ⤜āĨ‹ā¤Ŧ ā¤Ģā¤ŋ⤰ ⤏āĨ‡ ā¤šā¤˛ā¤žā¤¨ā¤ž ā¤šāĨ‹ā¤—ā¤žāĨ¤", "machine_learning_duplicate_detection": "ā¤ĄāĨā¤ĒāĨā¤˛ā¤ŋ⤕āĨ‡ā¤Ÿ ā¤•ā¤ž ā¤Ēā¤¤ā¤ž ā¤˛ā¤—ā¤žā¤¨ā¤ž", @@ -146,6 +154,18 @@ "machine_learning_min_detection_score_description": "⤕ā¤ŋ⤏āĨ€ ⤚āĨ‡ā¤šā¤°āĨ‡ ā¤•ā¤ž ā¤Ēā¤¤ā¤ž ā¤˛ā¤—ā¤žā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ⤍āĨā¤¯āĨ‚ā¤¨ā¤¤ā¤Ž ⤆⤤āĨā¤Žā¤ĩā¤ŋā¤ļāĨā¤ĩā¤žā¤¸ ⤏āĨā¤•āĨ‹ā¤° 0-1 ā¤šāĨ‹ā¤¨ā¤ž ā¤šā¤žā¤šā¤ŋā¤āĨ¤", "machine_learning_min_recognized_faces": "⤍ā¤ŋā¤ŽāĨā¤¨ā¤¤ā¤Ž ā¤Ēā¤šā¤šā¤žā¤¨āĨ‡ ⤚āĨ‡ā¤šā¤°āĨ‡", "machine_learning_min_recognized_faces_description": "⤕ā¤ŋ⤏āĨ€ ā¤ĩāĨā¤¯ā¤•āĨā¤¤ā¤ŋ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Ēā¤šā¤šā¤žā¤¨āĨ‡ ā¤œā¤žā¤¨āĨ‡ ā¤ĩā¤žā¤˛āĨ‡ ⤚āĨ‡ā¤šā¤°āĨ‹ā¤‚ ⤕āĨ€ ⤍āĨā¤¯āĨ‚ā¤¨ā¤¤ā¤Ž ⤏⤂⤖āĨā¤¯ā¤žāĨ¤", + "machine_learning_ocr": "⤓.⤏āĨ€.⤆⤰", + "machine_learning_ocr_description": "⤚ā¤ŋ⤤āĨā¤°āĨ‹ā¤‚ ā¤ŽāĨ‡ā¤‚ ā¤Ēā¤žā¤  ⤕āĨ‹ ā¤Ēā¤šā¤šā¤žā¤¨ā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Žā¤ļāĨ€ā¤¨ ⤞⤰āĨā¤¨ā¤ŋ⤂⤗ ā¤•ā¤ž ⤉ā¤Ē⤝āĨ‹ā¤— ⤕⤰āĨ‡ā¤‚", + "machine_learning_ocr_enabled": "⤓.⤏āĨ€.⤆⤰. ⤏⤕āĨā¤ˇā¤Ž ⤕⤰āĨ‡ā¤‚", + "machine_learning_ocr_enabled_description": "⤝ā¤Ļā¤ŋ ⤅⤕āĨā¤ˇā¤Ž ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨˆ, ⤤āĨ‹ ⤚ā¤ŋ⤤āĨā¤°āĨ‹ā¤‚ ā¤Ē⤰ ā¤Ēā¤žā¤ -ā¤Ēā¤šā¤šā¤žā¤¨ ā¤¨ā¤šāĨ€ā¤‚ ā¤šāĨ‹ā¤—ā¤žāĨ¤", + "machine_learning_ocr_max_resolution": "⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ⤰ā¤ŋ⤜ā¤ŧāĨ‰ā¤˛āĨā¤¯āĨ‚ā¤ļ⤍", + "machine_learning_ocr_max_resolution_description": "⤇⤏ ⤰ā¤ŋ⤜ā¤ŧāĨ‰ā¤˛āĨā¤¯āĨ‚ā¤ļ⤍ ⤏āĨ‡ ⤊ā¤Ē⤰ ⤕āĨ‡ ā¤ĒāĨā¤°ā¤Ļ⤰āĨā¤ļ⤍ ā¤•ā¤ž ā¤†ā¤•ā¤žā¤° ā¤ŽāĨ‚⤞ ⤅⤍āĨā¤Ēā¤žā¤¤ ⤕āĨ‹ ⤏⤂⤰⤕āĨā¤ˇā¤ŋ⤤ ⤕⤰⤤āĨ‡ ā¤šāĨā¤ ā¤Ŧā¤Ļ⤞ ā¤Ļā¤ŋā¤¯ā¤ž ā¤œā¤žā¤ā¤—ā¤žāĨ¤ ā¤‰ā¤šāĨā¤š ā¤Žā¤žā¤¨ ⤅⤧ā¤ŋ⤕ ⤏⤟āĨ€ā¤• ā¤šāĨ‹ā¤¤āĨ‡ ā¤šāĨˆā¤‚, ⤞āĨ‡ā¤•ā¤ŋ⤍ ā¤¸ā¤‚ā¤¸ā¤žā¤§ā¤ŋ⤤ ā¤šāĨ‹ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤅⤧ā¤ŋ⤕ ā¤ŽāĨ‡ā¤ŽāĨ‹ā¤°āĨ€ ⤔⤰ ā¤¸ā¤Žā¤¯ ā¤˛ā¤—ā¤žā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤", + "machine_learning_ocr_min_detection_score": "⤍āĨā¤¯āĨ‚ā¤¨ā¤¤ā¤Ž ⤖āĨ‹ā¤œ ⤅⤂⤕", + "machine_learning_ocr_min_detection_score_description": "ā¤Ēā¤žā¤  ā¤•ā¤ž ā¤Ēā¤¤ā¤ž ā¤˛ā¤—ā¤žā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ 0-1 ⤕āĨ‡ ā¤ŦāĨ€ā¤š ⤍āĨā¤¯āĨ‚ā¤¨ā¤¤ā¤Ž ⤆⤤āĨā¤Žā¤ĩā¤ŋā¤ļāĨā¤ĩā¤žā¤¸ ⤅⤂⤕āĨ¤ ā¤•ā¤Ž ⤅⤂⤕ ⤅⤧ā¤ŋ⤕ ā¤Ēā¤žā¤  ā¤•ā¤ž ā¤Ēā¤¤ā¤ž ā¤˛ā¤—ā¤žā¤ā¤‚ā¤—āĨ‡ ⤞āĨ‡ā¤•ā¤ŋ⤍ ā¤Ē⤰ā¤ŋā¤Ŗā¤žā¤Ž ⤗⤞⤤ ā¤šāĨ‹ ⤏⤕⤤āĨ‡ ā¤šāĨˆā¤‚āĨ¤", + "machine_learning_ocr_min_recognition_score": "⤍āĨā¤¯āĨ‚ā¤¨ā¤¤ā¤Ž ā¤Ēā¤šā¤šā¤žā¤¨ ⤅⤂⤕", + "machine_learning_ocr_min_score_recognition_description": "ā¤Ēā¤žā¤  ⤕āĨ‹ ā¤Ēā¤šā¤šā¤žā¤¨ā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ 0-1 ⤕āĨ‡ ā¤ŦāĨ€ā¤š ⤍āĨā¤¯āĨ‚ā¤¨ā¤¤ā¤Ž ⤆⤤āĨā¤Žā¤ĩā¤ŋā¤ļāĨā¤ĩā¤žā¤¸ ⤅⤂⤕āĨ¤ ā¤•ā¤Ž ⤅⤂⤕ ⤅⤧ā¤ŋ⤕ ā¤Ēā¤žā¤  ⤕āĨ‹ ā¤Ēā¤šā¤šā¤žā¤¨āĨ‡ā¤‚⤗āĨ‡ ⤞āĨ‡ā¤•ā¤ŋ⤍ ā¤Ē⤰ā¤ŋā¤Ŗā¤žā¤Ž ⤗⤞⤤ ā¤šāĨ‹ ⤏⤕⤤āĨ‡ ā¤šāĨˆā¤‚āĨ¤", + "machine_learning_ocr_model": "⤓⤏āĨ€ā¤†ā¤° ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤Žā¤žā¤¨", + "machine_learning_ocr_model_description": "⤏⤰āĨā¤ĩ⤰ ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤Žā¤žā¤¨ ā¤ŽāĨ‹ā¤Ŧā¤žā¤‡ā¤˛ ā¤ĒāĨā¤°ā¤¤ā¤ŋā¤Žā¤žā¤¨ ⤕āĨ€ ⤤āĨā¤˛ā¤¨ā¤ž ā¤ŽāĨ‡ā¤‚ ⤅⤧ā¤ŋ⤕ ⤏⤟āĨ€ā¤• ā¤šāĨ‹ā¤¤āĨ‡ ā¤šāĨˆā¤‚, ⤞āĨ‡ā¤•ā¤ŋ⤍ ā¤¸ā¤‚ā¤¸ā¤žā¤§ā¤ŋ⤤ ā¤šāĨ‹ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤅⤧ā¤ŋ⤕ ā¤ŽāĨ‡ā¤ŽāĨ‹ā¤°āĨ€ ⤔⤰ ā¤¸ā¤Žā¤¯ ⤞āĨ‡ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤", "machine_learning_settings": "ā¤Žā¤ļāĨ€ā¤¨ ⤞⤰āĨā¤¨ā¤ŋ⤂⤗ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗āĨā¤¸", "machine_learning_settings_description": "ā¤Žā¤ļāĨ€ā¤¨ ⤞⤰āĨā¤¨ā¤ŋ⤂⤗ ⤏āĨā¤ĩā¤ŋā¤§ā¤žā¤“ā¤‚ ⤔⤰ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗āĨā¤¸ ⤕āĨ‹ ā¤ĒāĨā¤°ā¤Ŧ⤂⤧ā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", "machine_learning_smart_search": "⤏āĨā¤Žā¤žā¤°āĨā¤Ÿ ⤖āĨ‹ā¤œ", @@ -203,6 +223,8 @@ "notification_email_ignore_certificate_errors_description": "⤟āĨ€ā¤ā¤˛ā¤ā¤¸ ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤Ē⤤āĨā¤° ⤏⤤āĨā¤¯ā¤žā¤Ē⤍ ⤤āĨā¤°āĨā¤Ÿā¤ŋ⤝āĨ‹ā¤‚ ā¤Ē⤰ ⤧āĨā¤¯ā¤žā¤¨ ⤍ ā¤ĻāĨ‡ā¤‚ (⤅⤍āĨā¤ļ⤂⤏ā¤ŋ⤤ ā¤¨ā¤šāĨ€ā¤‚)", "notification_email_password_description": "ā¤ˆā¤ŽāĨ‡ā¤˛ ⤏⤰āĨā¤ĩ⤰ ⤏āĨ‡ ā¤ĒāĨā¤°ā¤Žā¤žā¤ŖāĨ€ā¤•⤰⤪ ⤕⤰⤤āĨ‡ ā¤¸ā¤Žā¤¯ ⤉ā¤Ē⤝āĨ‹ā¤— ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤¨āĨ‡ ā¤ĩā¤žā¤˛ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą", "notification_email_port_description": "ā¤ˆā¤ŽāĨ‡ā¤˛ ⤏⤰āĨā¤ĩ⤰ ā¤•ā¤ž ā¤ĒāĨ‹ā¤°āĨā¤Ÿ (⤜āĨˆā¤¸āĨ‡ 25, 465, ā¤¯ā¤ž 587)", + "notification_email_secure": "ā¤ā¤¸ ā¤ā¤Ž ⤟āĨ€ ā¤ĒāĨ€ ā¤ā¤¸", + "notification_email_secure_description": "ā¤ā¤¸.ā¤ā¤Ž.⤟āĨ€.ā¤ĒāĨ€.ā¤ā¤¸. ā¤ĒāĨā¤°ā¤¯āĨ‹ā¤— ⤕⤰āĨ‡ā¤‚ (⤟āĨ€.ā¤ā¤˛.ā¤ā¤¸ ā¤Ē⤰ ā¤ā¤¸.ā¤ā¤Ž.⤟āĨ€.ā¤ĒāĨ€)", "notification_email_sent_test_email_button": "ā¤Ē⤰āĨ€ā¤•āĨā¤ˇā¤Ŗ ā¤ˆā¤ŽāĨ‡ā¤˛ ⤭āĨ‡ā¤œāĨ‡ā¤‚ ⤔⤰ ā¤¸ā¤šāĨ‡ā¤œāĨ‡ā¤‚", "notification_email_setting_description": "ā¤ˆā¤ŽāĨ‡ā¤˛ ⤏āĨ‚ā¤šā¤¨ā¤žā¤ā¤‚ ⤭āĨ‡ā¤œā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗āĨā¤¸", "notification_email_test_email": "ā¤Ē⤰āĨ€ā¤•āĨā¤ˇā¤Ŗ ā¤ˆā¤ŽāĨ‡ā¤˛ ⤭āĨ‡ā¤œāĨ‡ā¤‚", @@ -235,6 +257,7 @@ "oauth_storage_quota_default_description": "GiB ā¤ŽāĨ‡ā¤‚ ⤕āĨ‹ā¤Ÿā¤ž ā¤•ā¤ž ⤉ā¤Ē⤝āĨ‹ā¤— ⤤ā¤Ŧ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤ā¤—ā¤ž ⤜ā¤Ŧ ⤕āĨ‹ā¤ˆ ā¤Ļā¤žā¤ĩā¤ž ā¤ĒāĨā¤°ā¤Ļā¤žā¤¨ ā¤¨ā¤šāĨ€ā¤‚ ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨ‹ āĨ¤", "oauth_timeout": "ā¤ŦāĨā¤°āĨ‡ā¤• ā¤•ā¤ž ⤅⤍āĨā¤°āĨ‹ā¤§", "oauth_timeout_description": "⤅⤍āĨā¤°āĨ‹ā¤§āĨ‹ā¤‚ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤¸ā¤Žā¤¯-⤏āĨ€ā¤Žā¤ž ā¤Žā¤ŋ⤞āĨ€ā¤¸āĨ‡ā¤•ā¤‚ā¤Ą ā¤ŽāĨ‡ā¤‚", + "ocr_job_description": "⤚ā¤ŋ⤤āĨā¤°āĨ‹ā¤‚ ā¤ŽāĨ‡ā¤‚ ā¤Ēā¤žā¤  ⤕āĨ‹ ā¤Ēā¤šā¤šā¤žā¤¨ā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Žā¤ļāĨ€ā¤¨ ⤞⤰āĨā¤¨ā¤ŋ⤂⤗ ā¤•ā¤ž ⤉ā¤Ē⤝āĨ‹ā¤— ⤕⤰āĨ‡ā¤‚", "password_enable_description": "ā¤ˆā¤ŽāĨ‡ā¤˛ ⤔⤰ ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ⤏āĨ‡ ⤞āĨ‰ā¤—ā¤ŋ⤍ ⤕⤰āĨ‡ā¤‚", "password_settings": "ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ⤞āĨ‰ā¤— ⤇⤍", "password_settings_description": "ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ⤞āĨ‰ā¤—ā¤ŋ⤍ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗ ā¤ĒāĨā¤°ā¤Ŧ⤂⤧ā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", @@ -325,7 +348,7 @@ "transcoding_max_b_frames": "⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ā¤ŦāĨ€-ā¤ĢāĨā¤°āĨ‡ā¤Ž", "transcoding_max_b_frames_description": "ā¤‰ā¤šāĨā¤š ā¤Žā¤žā¤¨ ⤏⤂ā¤ĒāĨ€ā¤Ąā¤ŧ⤍ ā¤Ļ⤕āĨā¤ˇā¤¤ā¤ž ā¤ŽāĨ‡ā¤‚ ⤏āĨā¤§ā¤žā¤° ⤕⤰⤤āĨ‡ ā¤šāĨˆā¤‚, ⤞āĨ‡ā¤•ā¤ŋ⤍ ā¤ā¤¨āĨā¤•āĨ‹ā¤Ąā¤ŋ⤂⤗ ⤕āĨ‹ ⤧āĨ€ā¤Žā¤ž ⤕⤰ ā¤ĻāĨ‡ā¤¤āĨ‡ ā¤šāĨˆā¤‚āĨ¤", "transcoding_max_bitrate": "⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ā¤Ŧā¤ŋ⤟⤰āĨ‡ā¤Ÿ", - "transcoding_max_bitrate_description": "⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ā¤Ŧā¤ŋ⤟⤰āĨ‡ā¤Ÿ ⤏āĨ‡ā¤Ÿ ⤕⤰⤍āĨ‡ ⤏āĨ‡ ā¤Ģā¤ŧā¤žā¤‡ā¤˛ ā¤†ā¤•ā¤žā¤° ⤕āĨ‹ ⤗āĨā¤Ŗā¤ĩ⤤āĨā¤¤ā¤ž ā¤Ē⤰ ā¤Žā¤žā¤ŽāĨ‚⤞āĨ€ ā¤˛ā¤žā¤—ā¤¤ ⤕āĨ‡ ā¤¸ā¤žā¤Ĩ ⤅⤧ā¤ŋ⤕ ā¤ĒāĨ‚⤰āĨā¤ĩā¤žā¤¨āĨā¤Žā¤žā¤¨ā¤ŋ⤤ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆāĨ¤ 720p ā¤Ē⤰, ā¤¸ā¤žā¤Žā¤žā¤¨āĨā¤¯ ā¤Žā¤žā¤¨ VP9 ā¤¯ā¤ž HEVC ⤕āĨ‡ ⤞ā¤ŋā¤ 2600k kbit/s ā¤¯ā¤ž H.264 ⤕āĨ‡ ⤞ā¤ŋā¤ 4500k kbit/s ā¤šāĨˆā¤‚āĨ¤ 0 ā¤Ē⤰ ⤏āĨ‡ā¤Ÿ ā¤šāĨ‹ā¤¨āĨ‡ ā¤Ē⤰ ⤅⤕āĨā¤ˇā¤ŽāĨ¤", + "transcoding_max_bitrate_description": "⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ā¤Ŧā¤ŋ⤟⤰āĨ‡ā¤Ÿ ⤏āĨ‡ā¤Ÿ ⤕⤰⤍āĨ‡ ⤏āĨ‡ ā¤Ģā¤ŧā¤žā¤‡ā¤˛ ā¤†ā¤•ā¤žā¤° ⤕āĨ‹ ⤗āĨā¤Ŗā¤ĩ⤤āĨā¤¤ā¤ž ā¤Ē⤰ ā¤Žā¤žā¤ŽāĨ‚⤞āĨ€ ā¤˛ā¤žā¤—ā¤¤ ⤕āĨ‡ ā¤¸ā¤žā¤Ĩ ⤅⤧ā¤ŋ⤕ ā¤ĒāĨ‚⤰āĨā¤ĩā¤žā¤¨āĨā¤Žā¤žā¤¨ā¤ŋ⤤ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆāĨ¤ 720p ā¤Ē⤰, ā¤¸ā¤žā¤Žā¤žā¤¨āĨā¤¯ ā¤Žā¤žā¤¨ VP9 ā¤¯ā¤ž HEVC ⤕āĨ‡ ⤞ā¤ŋā¤ 2600k kbit/s ā¤¯ā¤ž H.264 ⤕āĨ‡ ⤞ā¤ŋā¤ 4500k kbit/s ā¤šāĨˆā¤‚āĨ¤ 0 ā¤Ē⤰ ⤏āĨ‡ā¤Ÿ ā¤šāĨ‹ā¤¨āĨ‡ ā¤Ē⤰ ⤅⤕āĨā¤ˇā¤ŽāĨ¤ ⤜ā¤Ŧ ⤕āĨ‹ā¤ˆ ā¤‡ā¤•ā¤žā¤ˆ ⤍ā¤ŋ⤰āĨā¤Ļā¤ŋ⤎āĨā¤Ÿ ā¤¨ā¤šāĨ€ā¤‚ ⤕āĨ€ ā¤œā¤žā¤¤āĨ€ ā¤šāĨˆ, ⤤āĨ‹ k (kbit/s ⤕āĨ‡ ⤞ā¤ŋā¤) ā¤Žā¤žā¤¨ ⤞ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤¤ā¤ž ā¤šāĨˆ; ⤇⤏⤞ā¤ŋā¤ 5000, 5000k, ⤔⤰ 5M (Mbit/s ⤕āĨ‡ ⤞ā¤ŋā¤) ā¤¸ā¤Žā¤¤āĨā¤˛āĨā¤¯ ā¤šāĨˆā¤‚āĨ¤", "transcoding_max_keyframe_interval": "⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ā¤ŽāĨā¤–āĨā¤¯ā¤Ģā¤ŧāĨā¤°āĨ‡ā¤Ž ā¤…ā¤‚ā¤¤ā¤°ā¤žā¤˛", "transcoding_max_keyframe_interval_description": "ā¤ŽāĨā¤–āĨā¤¯ā¤Ģā¤ŧāĨā¤°āĨ‡ā¤Ž ⤕āĨ‡ ā¤ŦāĨ€ā¤š ⤅⤧ā¤ŋā¤•ā¤¤ā¤Ž ā¤Ģā¤ŧāĨā¤°āĨ‡ā¤Ž ā¤ĻāĨ‚⤰āĨ€ ⤍ā¤ŋ⤰āĨā¤§ā¤žā¤°ā¤ŋ⤤ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤", "transcoding_optimal_description": "⤞⤕āĨā¤ˇāĨā¤¯ ⤰ā¤ŋ⤜ā¤ŧāĨ‰ā¤˛āĨā¤¯āĨ‚ā¤ļ⤍ ⤏āĨ‡ ⤅⤧ā¤ŋ⤕ ā¤Šā¤‚ā¤šāĨ‡ ā¤ĩāĨ€ā¤Ąā¤ŋ⤝āĨ‹ ā¤¯ā¤ž ⤏āĨā¤ĩāĨ€ā¤•āĨƒā¤¤ ā¤ĒāĨā¤°ā¤žā¤°āĨ‚ā¤Ē ā¤ŽāĨ‡ā¤‚ ā¤¨ā¤šāĨ€ā¤‚", @@ -359,6 +382,9 @@ "trash_number_of_days_description": "⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ⤕āĨ‹ ⤏āĨā¤Ĩā¤žā¤¯āĨ€ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ā¤šā¤Ÿā¤žā¤¨āĨ‡ ⤏āĨ‡ ā¤Ēā¤šā¤˛āĨ‡ ⤉⤍āĨā¤šāĨ‡ā¤‚ ⤕āĨ‚ā¤Ąā¤ŧāĨ‡ā¤Ļā¤žā¤¨ ā¤ŽāĨ‡ā¤‚ ⤰⤖⤍āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Ļā¤ŋ⤍āĨ‹ā¤‚ ⤕āĨ€ ⤏⤂⤖āĨā¤¯ā¤ž", "trash_settings": "⤟āĨā¤°āĨˆā¤ļ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗", "trash_settings_description": "⤟āĨā¤°āĨˆā¤ļ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗ ā¤ĒāĨā¤°ā¤Ŧ⤂⤧ā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", + "unlink_all_oauth_accounts": "⤏⤭āĨ€ ⤓.⤔ā¤Ĩ ā¤–ā¤žā¤¤āĨ‹ā¤‚ ⤏āĨ‡ ⤏⤂ā¤Ē⤰āĨā¤• ⤤āĨ‹āĨœ ā¤ĻāĨ‡ā¤‚", + "unlink_all_oauth_accounts_description": "ā¤¨ā¤ ā¤ĒāĨā¤°ā¤Ļā¤žā¤¤ā¤ž ā¤Ē⤰ ā¤¸ā¤¤ā¤žā¤¨ā¤žā¤‚ā¤¤ā¤°ā¤Ŗ ⤕⤰⤍āĨ‡ ⤏āĨ‡ ā¤Ēā¤šā¤˛āĨ‡ ⤏⤭āĨ€ ⤓.⤔ā¤Ĩ ā¤–ā¤žā¤¤āĨ‹ā¤‚ ⤏āĨ‡ ⤏⤂ā¤Ē⤰āĨā¤• ⤤āĨ‹āĨœā¤¨ā¤ž ā¤¯ā¤žā¤Ļ ⤰⤖āĨ‡ā¤‚āĨ¤", + "unlink_all_oauth_accounts_prompt": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ā¤ĩā¤žā¤•ā¤ˆ ⤏⤭āĨ€ ⤓.⤔ā¤Ĩ ā¤–ā¤žā¤¤āĨ‹ā¤‚ ⤏āĨ‡ ⤏⤂ā¤Ē⤰āĨā¤• ⤤āĨ‹āĨœā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚? ⤇⤏⤏āĨ‡ ā¤ĒāĨā¤°ā¤¤āĨā¤¯āĨ‡ā¤• ⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤ž ⤕āĨ‡ ⤞ā¤ŋā¤ ⤓.⤔ā¤Ĩ ā¤†ā¤ˆ.ā¤ĄāĨ€ ⤰ā¤ĻāĨā¤Ļ ā¤šāĨ‹ ā¤œā¤žā¤ā¤—āĨ€ ⤔⤰ ⤇⤏āĨ‡ ā¤ĒāĨ‚⤰āĨā¤ĩā¤ĩ⤤ ā¤¨ā¤šāĨ€ā¤‚ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ⤏⤕āĨ‡ā¤—ā¤žāĨ¤", "user_cleanup_job": "⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤ž ⤏ā¤Ģā¤ŧā¤žā¤ˆ", "user_delete_delay": "{user} ⤕āĨ‡ ā¤–ā¤žā¤¤āĨ‡ ⤔⤰ ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ⤕āĨ‹ {delay, plural, one {# day} other {# days}} ā¤ŽāĨ‡ā¤‚ ⤏āĨā¤Ĩā¤žā¤¯āĨ€ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ā¤šā¤Ÿā¤žā¤¨āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤ļāĨ‡ā¤ĄāĨā¤¯āĨ‚⤞ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤žā¤ā¤—ā¤žāĨ¤", "user_delete_delay_settings": "ā¤šā¤Ÿā¤žā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĻāĨ‡ā¤°āĨ€", @@ -392,6 +418,8 @@ "advanced_settings_prefer_remote_title": "ā¤ĻāĨ‚⤰⤏āĨā¤Ĩ ⤛ā¤ĩā¤ŋ⤝āĨ‹ā¤‚ ⤕āĨ‹ ā¤ĒāĨā¤°ā¤žā¤Ĩā¤Žā¤ŋā¤•ā¤¤ā¤ž ā¤ĻāĨ‡ā¤‚", "advanced_settings_proxy_headers_subtitle": "ā¤ĒāĨā¤°ā¤¤āĨā¤¯āĨ‡ā¤• ⤍āĨ‡ā¤Ÿā¤ĩ⤰āĨā¤• ⤅⤍āĨā¤°āĨ‹ā¤§ ⤕āĨ‡ ā¤¸ā¤žā¤Ĩ ā¤‡ā¤ŽāĨā¤Žā¤ŋ⤚ ā¤ĻāĨā¤ĩā¤žā¤°ā¤ž ⤭āĨ‡ā¤œāĨ‡ ā¤œā¤žā¤¨āĨ‡ ā¤ĩā¤žā¤˛āĨ‡ ā¤ĒāĨā¤°āĨ‰ā¤•āĨā¤¸āĨ€ ā¤šāĨ‡ā¤Ąā¤° ⤕āĨ‹ ā¤Ē⤰ā¤ŋā¤­ā¤žā¤ˇā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", "advanced_settings_proxy_headers_title": "ā¤ĒāĨā¤°āĨ‰ā¤•āĨā¤¸āĨ€ ā¤šāĨ‡ā¤Ąā¤°", + "advanced_settings_readonly_mode_subtitle": "⤰āĨ€ā¤Ą-⤓⤍⤞āĨ€ ā¤ĒāĨā¤°ā¤Ŗā¤žā¤˛āĨ€ ⤕āĨ‹ ⤏⤕āĨā¤ˇā¤Ž ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆ ā¤œā¤šā¤žā¤‚ ⤚ā¤ŋ⤤āĨā¤° ⤕āĨ‹ ⤕āĨ‡ā¤ĩ⤞ ā¤ĻāĨ‡ā¤–ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ, ā¤ā¤•ā¤žā¤§ā¤ŋ⤕ ⤚ā¤ŋ⤤āĨā¤°āĨ‹ā¤‚ ā¤•ā¤ž ⤚⤝⤍ ā¤•ā¤°ā¤¨ā¤ž, ā¤¸ā¤žā¤ā¤ž ā¤•ā¤°ā¤¨ā¤ž, ā¤•ā¤žā¤¸āĨā¤Ÿā¤ŋ⤂⤗ ā¤•ā¤°ā¤¨ā¤ž, ā¤šā¤Ÿā¤žā¤¨ā¤ž ⤜āĨˆā¤¸āĨ€ ⤏⤭āĨ€ ⤚āĨ€ā¤œā¤ŧāĨ‡ā¤‚ ⤅⤕āĨā¤ˇā¤Ž ā¤šāĨˆā¤‚āĨ¤ ā¤ŽāĨā¤–āĨā¤¯ ⤏āĨā¤•āĨā¤°āĨ€ā¤¨ ā¤ŽāĨ‡ā¤‚ ⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤ž- ⤅ā¤ĩā¤¤ā¤žā¤° ⤕āĨ‡ ā¤Žā¤žā¤§āĨā¤¯ā¤Ž ⤏āĨ‡ ⤰āĨ€ā¤Ą-⤓⤍⤞āĨ€ ā¤ĒāĨā¤°ā¤Ŗā¤žā¤˛āĨ€ ⤕āĨ‹ ⤏⤕āĨā¤ˇā¤Ž/⤅⤕āĨā¤ˇā¤Ž ⤕⤰āĨ‡ā¤‚", + "advanced_settings_readonly_mode_title": "⤰āĨ€ā¤Ą-⤓⤍⤞āĨ€ ā¤ĒāĨā¤°ā¤Ŗā¤žā¤˛āĨ€", "advanced_settings_self_signed_ssl_subtitle": "⤏⤰āĨā¤ĩ⤰ ā¤ā¤‚ā¤Ąā¤ĒāĨ‰ā¤‡ā¤‚ā¤Ÿ ⤕āĨ‡ ⤞ā¤ŋā¤ SSL ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤Ē⤤āĨā¤° ⤏⤤āĨā¤¯ā¤žā¤Ē⤍ ⤕āĨ‹ ⤛āĨ‹ā¤Ąā¤ŧ ā¤ĻāĨ‡ā¤¤ā¤ž ā¤šāĨˆāĨ¤ ⤏āĨā¤ĩ-ā¤šā¤¸āĨā¤¤ā¤žā¤•āĨā¤ˇā¤°ā¤ŋ⤤ ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤Ē⤤āĨā¤°āĨ‹ā¤‚ ⤕āĨ‡ ⤞ā¤ŋā¤ ⤆ā¤ĩā¤ļāĨā¤¯ā¤• ā¤šāĨˆāĨ¤", "advanced_settings_self_signed_ssl_title": "⤏āĨā¤ĩ-ā¤šā¤¸āĨā¤¤ā¤žā¤•āĨā¤ˇā¤°ā¤ŋ⤤ SSL ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤Ē⤤āĨā¤°āĨ‹ā¤‚ ⤕āĨ€ ⤅⤍āĨā¤Žā¤¤ā¤ŋ ā¤ĻāĨ‡ā¤‚", "advanced_settings_sync_remote_deletions_subtitle": "ā¤ĩāĨ‡ā¤Ŧ ā¤Ē⤰ ā¤•ā¤žā¤°āĨā¤°ā¤ĩā¤žā¤ˆ ⤕ā¤ŋā¤ ā¤œā¤žā¤¨āĨ‡ ā¤Ē⤰ ⤇⤏ ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸ ā¤Ē⤰ ⤕ā¤ŋ⤏āĨ€ ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ ⤕āĨ‹ ⤏āĨā¤ĩā¤šā¤žā¤˛ā¤ŋ⤤ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ā¤šā¤Ÿā¤žā¤ā¤ ā¤¯ā¤ž ā¤ĒāĨā¤¨ā¤°āĨā¤¸āĨā¤Ĩā¤žā¤Ēā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", @@ -419,6 +447,7 @@ "album_remove_user_confirmation": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ā¤ĩā¤žā¤•ā¤ˆ {user} ⤕āĨ‹ ā¤šā¤Ÿā¤žā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", "album_search_not_found": "⤆ā¤Ē⤕āĨ€ ⤖āĨ‹ā¤œ ⤏āĨ‡ ā¤ŽāĨ‡ā¤˛ ā¤–ā¤žā¤¤ā¤ž ⤕āĨ‹ā¤ˆ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤¨ā¤šāĨ€ā¤‚ ā¤Žā¤ŋā¤˛ā¤ž", "album_share_no_users": "ā¤ā¤¸ā¤ž ā¤˛ā¤—ā¤¤ā¤ž ā¤šāĨˆ ⤕ā¤ŋ ⤆ā¤Ē⤍āĨ‡ ā¤¯ā¤š ā¤ā¤˛āĨā¤Ŧā¤Ž ⤏⤭āĨ€ ⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤žā¤“⤂ ⤕āĨ‡ ā¤¸ā¤žā¤Ĩ ā¤¸ā¤žā¤ā¤ž ⤕⤰ ā¤Ļā¤ŋā¤¯ā¤ž ā¤šāĨˆ ā¤¯ā¤ž ⤆ā¤Ē⤕āĨ‡ ā¤Ēā¤žā¤¸ ā¤¸ā¤žā¤ā¤ž ⤕⤰⤍āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ⤕āĨ‹ā¤ˆ ⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤ž ā¤¨ā¤šāĨ€ā¤‚ ā¤šāĨˆāĨ¤", + "album_summary": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤¸ā¤žā¤°ā¤žā¤‚ā¤ļ", "album_updated": "ā¤ā¤˛āĨā¤Ŧā¤Ž ⤅ā¤Ēā¤ĄāĨ‡ā¤Ÿ ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž", "album_updated_setting_description": "⤜ā¤Ŧ ⤕ā¤ŋ⤏āĨ€ ā¤¸ā¤žā¤ā¤ž ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ⤍⤈ ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋā¤¯ā¤žā¤ ā¤šāĨ‹ā¤‚ ⤤āĨ‹ ā¤ā¤• ā¤ˆā¤ŽāĨ‡ā¤˛ ⤏āĨ‚ā¤šā¤¨ā¤ž ā¤ĒāĨā¤°ā¤žā¤ĒāĨā¤¤ ⤕⤰āĨ‡ā¤‚", "album_user_left": "ā¤Ŧā¤žā¤¯ā¤žā¤ {album}", @@ -452,11 +481,16 @@ "api_key_description": "ā¤¯ā¤š ⤕āĨ€ ⤕āĨ‡ā¤ĩ⤞ ā¤ā¤• ā¤Ŧā¤žā¤° ā¤Ļā¤ŋā¤–ā¤žā¤ˆ ā¤œā¤žā¤ā¤—āĨ€āĨ¤ ā¤ĩā¤ŋā¤‚ā¤ĄāĨ‹ ā¤Ŧ⤂ā¤Ļ ⤕⤰⤍āĨ‡ ⤏āĨ‡ ā¤Ēā¤šā¤˛āĨ‡ ⤕āĨƒā¤Ēā¤¯ā¤ž ⤇⤏āĨ‡ ⤕āĨ‰ā¤ĒāĨ€ ā¤•ā¤°ā¤¨ā¤ž ⤏āĨā¤¨ā¤ŋā¤ļāĨā¤šā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚āĨ¤āĨ¤", "api_key_empty": "⤆ā¤Ēā¤•ā¤ž ā¤ā¤ĒāĨ€ā¤†ā¤ˆ ⤕āĨā¤‚ā¤œāĨ€ ā¤¨ā¤žā¤Ž ā¤–ā¤žā¤˛āĨ€ ā¤¨ā¤šāĨ€ā¤‚ ā¤šāĨ‹ā¤¨ā¤ž ā¤šā¤žā¤šā¤ŋā¤", "api_keys": "ā¤ā¤ĒāĨ€ā¤†ā¤ˆ ⤕āĨ€ā¤œ", + "app_architecture_variant": "⤰āĨ‚ā¤Ēā¤žā¤¨āĨā¤¤ā¤° (⤏āĨā¤Ĩā¤žā¤Ē⤤āĨā¤¯/⤆⤰āĨā¤•ā¤ŋ⤟āĨ‡ā¤•āĨā¤šā¤°)", "app_bar_signout_dialog_content": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ⤏āĨā¤¨ā¤ŋā¤ļāĨā¤šā¤ŋ⤤ ā¤šāĨˆā¤‚ ⤕ā¤ŋ ⤆ā¤Ē ⤞āĨ‰ā¤— ā¤†ā¤‰ā¤Ÿ ā¤•ā¤°ā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", "app_bar_signout_dialog_ok": "ā¤šā¤žā¤", "app_bar_signout_dialog_title": "⤞āĨ‰ā¤— ā¤†ā¤‰ā¤Ÿ", + "app_download_links": "⤐ā¤Ē ā¤Ąā¤žā¤‰ā¤¨ā¤˛āĨ‹ā¤Ą ⤞ā¤ŋ⤂⤕", "app_settings": "ā¤ā¤ĒāĨā¤˛ā¤ŋ⤕āĨ‡ā¤ļ⤍ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗", + "app_stores": "⤐ā¤Ē ⤏āĨā¤ŸāĨ‹ā¤°/⤗āĨ‹ā¤Ļā¤žā¤Ž", + "app_update_available": "⤆⤧āĨā¤¨ā¤ŋ⤕ ⤐ā¤Ē ⤉ā¤Ē⤞ā¤ŦāĨā¤§ ā¤šāĨˆ", "appears_in": "ā¤ĒāĨā¤°ā¤•ā¤Ÿ ā¤šāĨ‹ā¤¤ā¤ž ā¤šāĨˆ", + "apply_count": "ā¤˛ā¤žā¤—āĨ‚ ⤕⤰āĨ‡ā¤‚ ({count, number})", "archive": "⤏⤂⤗āĨā¤°ā¤šā¤žā¤˛ā¤¯", "archive_action_prompt": "{count} ⤕āĨ‹ ⤏⤂⤗āĨā¤°ā¤š ā¤ŽāĨ‡ā¤‚ ⤜āĨ‹ā¤Ąā¤ŧā¤ž ā¤—ā¤¯ā¤ž", "archive_or_unarchive_photo": "ā¤Ģā¤ŧāĨ‹ā¤ŸāĨ‹ ⤕āĨ‹ ⤏⤂⤗āĨā¤°ā¤šāĨ€ā¤¤ ā¤¯ā¤ž ⤅⤏⤂⤗āĨā¤°ā¤šāĨ€ā¤¤ ⤕⤰āĨ‡ā¤‚", @@ -465,17 +499,17 @@ "archive_size": "ā¤ĒāĨā¤°ā¤žā¤˛āĨ‡ā¤– ā¤†ā¤•ā¤žā¤°", "archive_size_description": "ā¤Ąā¤žā¤‰ā¤¨ā¤˛āĨ‹ā¤Ą ⤕āĨ‡ ⤞ā¤ŋā¤ ⤏⤂⤗āĨā¤°ā¤š ā¤†ā¤•ā¤žā¤° ⤕āĨ‰ā¤¨āĨā¤Ģā¤ŧā¤ŋ⤗⤰ ⤕⤰āĨ‡ā¤‚ (GiB ā¤ŽāĨ‡ā¤‚)", "archived": "⤏⤂⤗āĨā¤°ā¤šā¤ŋ⤤", - "archived_count": "{count, plural, other {# ⤏⤂⤗āĨā¤°ā¤šāĨ€ā¤¤ ⤕ā¤ŋā¤ ā¤—ā¤}", + "archived_count": "{count, plural, other {# ⤏⤂⤗āĨā¤°ā¤šāĨ€ā¤¤ ⤕ā¤ŋā¤ ā¤—ā¤}}", "are_these_the_same_person": "⤕āĨā¤¯ā¤ž ⤝āĨ‡ ā¤ĩā¤šāĨ€ ā¤ĩāĨā¤¯ā¤•āĨā¤¤ā¤ŋ ā¤šāĨˆā¤‚?", "are_you_sure_to_do_this": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ā¤ĩā¤žā¤¸āĨā¤¤ā¤ĩ ā¤ŽāĨ‡ā¤‚ ⤇⤏āĨ‡ ā¤•ā¤°ā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", "asset_action_delete_err_read_only": "⤕āĨ‡ā¤ĩ⤞ ā¤Ēā¤ĸā¤ŧ⤍āĨ‡ ⤝āĨ‹ā¤—āĨā¤¯ ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ(⤓⤂) ⤕āĨ‹ ā¤šā¤Ÿā¤žā¤¯ā¤ž ā¤¨ā¤šāĨ€ā¤‚ ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž, ⤛āĨ‹ā¤Ąā¤ŧā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž ā¤šāĨˆ", "asset_action_share_err_offline": "⤑ā¤Ģā¤ŧā¤˛ā¤žā¤‡ā¤¨ ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ(ā¤ā¤) ā¤ĒāĨā¤°ā¤žā¤ĒāĨā¤¤ ā¤¨ā¤šāĨ€ā¤‚ ⤕āĨ€ ā¤œā¤ž ⤏⤕⤤āĨ€, ⤛āĨ‹ā¤Ąā¤ŧāĨ€ ā¤œā¤ž ā¤°ā¤šāĨ€ ā¤šāĨˆ", "asset_added_to_album": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛ā¤ž ā¤—ā¤¯ā¤ž", - "asset_adding_to_album": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛ā¤ž ā¤œā¤ž ā¤°ā¤šā¤ž ā¤šāĨˆ..āĨ¤", + "asset_adding_to_album": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛ā¤ž ā¤œā¤ž ā¤°ā¤šā¤ž ā¤šāĨˆâ€Ļ", "asset_description_updated": "⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ ā¤ĩā¤ŋā¤ĩ⤰⤪ ⤅ā¤ĻāĨā¤¯ā¤¤ā¤¨ ⤕⤰ ā¤Ļā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨˆ", "asset_filename_is_offline": "ā¤ā¤¸āĨ‡ā¤Ÿ {filename} ⤑ā¤Ģā¤ŧā¤˛ā¤žā¤‡ā¤¨ ā¤šāĨˆ", "asset_has_unassigned_faces": "ā¤ā¤¸āĨ‡ā¤Ÿ ā¤ŽāĨ‡ā¤‚ ⤅⤍ā¤ŋ⤰āĨā¤§ā¤žā¤°ā¤ŋ⤤ ⤚āĨ‡ā¤šā¤°āĨ‡ ā¤šāĨˆā¤‚", - "asset_hashing": "ā¤šāĨˆā¤ļā¤ŋ⤂⤗...āĨ¤", + "asset_hashing": "ā¤šāĨˆā¤ļā¤ŋ⤂⤗â€Ļ", "asset_list_group_by_sub_title": "ā¤ĻāĨā¤ĩā¤žā¤°ā¤ž ā¤¸ā¤ŽāĨ‚ā¤š ā¤Ŧā¤¨ā¤žā¤ā¤‚", "asset_list_layout_settings_dynamic_layout_title": "⤗⤤ā¤ŋā¤ļāĨ€ā¤˛ ⤞āĨ‡ā¤†ā¤‰ā¤Ÿ", "asset_list_layout_settings_group_automatically": "⤏āĨā¤ĩā¤šā¤žā¤˛ā¤ŋ⤤", @@ -489,6 +523,8 @@ "asset_restored_successfully": "⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ(ā¤¯ā¤žā¤) ⤏ā¤Ģā¤˛ā¤¤ā¤žā¤ĒāĨ‚⤰āĨā¤ĩ⤕ ā¤ĒāĨā¤¨ā¤°āĨā¤¸āĨā¤Ĩā¤žā¤Ēā¤ŋ⤤ ⤕āĨ€ ā¤—ā¤ˆā¤‚", "asset_skipped": "⤛āĨ‹ā¤Ąā¤ŧā¤ž ā¤—ā¤¯ā¤ž", "asset_skipped_in_trash": "ā¤•ā¤šā¤°āĨ‡ ā¤ŽāĨ‡ā¤‚", + "asset_trashed": "ā¤ā¤¸āĨ‡ā¤Ÿ ⤍⤎āĨā¤Ÿ ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž", + "asset_troubleshoot": "ā¤ā¤¸āĨ‡ā¤Ÿ ā¤¸ā¤Žā¤¸āĨā¤¯ā¤ž ⤍ā¤ŋā¤ĩā¤žā¤°ā¤Ŗ", "asset_uploaded": "⤅ā¤Ē⤞āĨ‹ā¤Ą ⤕ā¤ŋā¤ ā¤—ā¤", "asset_uploading": "⤅ā¤Ē⤞āĨ‹ā¤Ą ā¤šāĨ‹ ā¤°ā¤šā¤ž ā¤šāĨˆâ€Ļ", "asset_viewer_settings_subtitle": "⤅ā¤Ē⤍āĨ€ ⤗āĨˆā¤˛ā¤°āĨ€ ā¤ĩāĨā¤¯āĨ‚⤅⤰ ⤏āĨ‡ā¤Ÿā¤ŋ⤂⤗ ā¤ĒāĨā¤°ā¤Ŧ⤂⤧ā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", @@ -496,7 +532,9 @@ "assets": "⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋā¤¯ā¤žā¤‚", "assets_added_count": "{count, plural, one {# asset} other {# assets}} ⤜āĨ‹ā¤Ąā¤ŧā¤ž ā¤—ā¤¯ā¤ž", "assets_added_to_album_count": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ {count, plural, one {# asset} other {# assets}} ⤜āĨ‹ā¤Ąā¤ŧā¤ž ā¤—ā¤¯ā¤ž", + "assets_added_to_albums_count": "{assetTotal, plural, one {# asset} other {# assets}} ⤕āĨ‹ {albumTotal, plural, one {# album} other {# albums}} ⤏āĨ‡ ⤜āĨ‹āĨœā¤ž ā¤—ā¤¯ā¤ž", "assets_cannot_be_added_to_album_count": "{count, plural, one {Asset} other {Assets}} ⤕āĨ‹ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤¨ā¤šāĨ€ā¤‚ ⤜āĨ‹ā¤Ąā¤ŧā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž", + "assets_cannot_be_added_to_albums": "{count, plural, one {Asset} other {Assets}} ⤕ā¤ŋ⤏āĨ€ ā¤ā¤˛āĨā¤Ŧā¤Ž ⤏āĨ‡ ā¤¨ā¤šāĨ€ā¤‚ ⤜āĨ‹āĨœāĨ‡ ā¤œā¤ž ⤏⤕⤤āĨ‡", "assets_count": "{count, plural, one {# ā¤†ā¤‡ā¤Ÿā¤Ž} other {# ā¤†ā¤‡ā¤Ÿā¤ŽāĨā¤¸}}", "assets_deleted_permanently": "{count} ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ(ā¤¯ā¤žā¤) ⤏āĨā¤Ĩā¤žā¤¯āĨ€ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ā¤šā¤Ÿā¤ž ā¤ĻāĨ€ ā¤—ā¤ˆā¤‚", "assets_deleted_permanently_from_server": "{count} ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ(ā¤¯ā¤žā¤) ā¤‡ā¤Žā¤ŋ⤚ ⤏⤰āĨā¤ĩ⤰ ⤏āĨ‡ ⤏āĨā¤Ĩā¤žā¤¯āĨ€ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ā¤šā¤Ÿā¤ž ā¤ĻāĨ€ ā¤—ā¤ˆā¤‚", @@ -513,14 +551,17 @@ "assets_trashed_count": "⤟āĨā¤°āĨˆā¤ļ ⤕āĨ€ ā¤—ā¤ˆ {count, plural, one {# asset} other {# assets}}", "assets_trashed_from_server": "{count} ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ(ā¤¯ā¤žā¤) ā¤‡ā¤Žā¤ŋ⤚ ⤏⤰āĨā¤ĩ⤰ ⤏āĨ‡ ā¤•ā¤šā¤°āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛āĨ€ ā¤—ā¤ˆā¤‚", "assets_were_part_of_album_count": "{count, plural, one {Asset was} other {Assets were}}ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤•ā¤ž ā¤Ēā¤šā¤˛āĨ‡ ⤏āĨ‡ ā¤šāĨ€ ā¤šā¤ŋ⤏āĨā¤¸ā¤ž ā¤ĨāĨ‡", + "assets_were_part_of_albums_count": "{count, plural, one {Asset was} other {Assets were}} ā¤Ēā¤šā¤˛āĨ‡ ā¤šāĨ€ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ⤏⤂⤝āĨ‹ā¤œā¤ŋ⤤ ā¤šāĨˆā¤‚", "authorized_devices": "⤅⤧ā¤ŋ⤕āĨƒā¤¤ ⤉ā¤Ē⤕⤰⤪", "automatic_endpoint_switching_subtitle": "⤉ā¤Ē⤞ā¤ŦāĨā¤§ ā¤šāĨ‹ā¤¨āĨ‡ ā¤Ē⤰ ⤍ā¤ŋ⤰āĨā¤Ļā¤ŋ⤎āĨā¤Ÿ ā¤ĩā¤žā¤ˆ-ā¤Ģā¤žā¤ˆ ⤏āĨ‡ ⤏āĨā¤Ĩā¤žā¤¨āĨ€ā¤¯ ⤰āĨ‚ā¤Ē ⤏āĨ‡ ⤕⤍āĨ‡ā¤•āĨā¤Ÿ ⤕⤰āĨ‡ā¤‚ ⤔⤰ ⤅⤍āĨā¤¯ā¤¤āĨā¤° ā¤ĩāĨˆā¤•⤞āĨā¤Ēā¤ŋ⤕ ⤕⤍āĨ‡ā¤•āĨā¤ļ⤍ ā¤•ā¤ž ⤉ā¤Ē⤝āĨ‹ā¤— ⤕⤰āĨ‡ā¤‚", "automatic_endpoint_switching_title": "⤏āĨā¤ĩā¤šā¤žā¤˛ā¤ŋ⤤ URL ⤏āĨā¤ĩā¤ŋ⤚ā¤ŋ⤂⤗", "autoplay_slideshow": "ā¤‘ā¤ŸāĨ‹ā¤ĒāĨā¤˛āĨ‡ ⤏āĨā¤˛ā¤žā¤‡ā¤Ą ā¤ļāĨ‹", "back": "ā¤ĩā¤žā¤Ē⤏", "back_close_deselect": "ā¤ĩā¤žā¤Ē⤏ ā¤œā¤žā¤ā¤, ā¤Ŧ⤂ā¤Ļ ⤕⤰āĨ‡ā¤‚, ā¤¯ā¤ž ā¤…ā¤šā¤¯ā¤¨ā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", + "background_backup_running_error": "ā¤Ē⤰ā¤ŋā¤ĒāĨā¤°āĨ‡ā¤•āĨā¤ˇāĨā¤¯ ā¤ŦāĨˆā¤•⤅ā¤Ē ⤅⤭āĨ€ ā¤œā¤žā¤°āĨ€ ā¤šāĨˆ, ⤍ā¤ŋā¤¯ā¤Žā¤žā¤ĩ⤞āĨ€ ā¤ŦāĨˆā¤•⤅ā¤Ē ā¤ĒāĨā¤°ā¤žā¤°ā¤‚⤭ ā¤¨ā¤šāĨ€ā¤‚ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž", "background_location_permission": "ā¤ĒāĨƒā¤ˇāĨā¤ ā¤­āĨ‚ā¤Žā¤ŋ ⤏āĨā¤Ĩā¤žā¤¨ ⤅⤍āĨā¤Žā¤¤ā¤ŋ", "background_location_permission_content": "ā¤ĒāĨƒā¤ˇāĨā¤ ā¤­āĨ‚ā¤Žā¤ŋ ā¤ŽāĨ‡ā¤‚ ⤚⤞⤤āĨ‡ ā¤¸ā¤Žā¤¯ ⤍āĨ‡ā¤Ÿā¤ĩ⤰āĨā¤• ā¤Ŧā¤Ļ⤞⤍āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤, Immich ⤕āĨ‡ ā¤Ēā¤žā¤¸ *ā¤šā¤ŽāĨ‡ā¤ļā¤ž* ⤏⤟āĨ€ā¤• ⤏āĨā¤Ĩā¤žā¤¨ ⤤⤕ ā¤Ēā¤šāĨā¤‚ā¤š ā¤šāĨ‹ā¤¨āĨ€ ā¤šā¤žā¤šā¤ŋā¤ ā¤¤ā¤žā¤•ā¤ŋ ⤐ā¤Ē ā¤ĩā¤žā¤ˆ-ā¤Ģā¤žā¤ˆ ⤍āĨ‡ā¤Ÿā¤ĩ⤰āĨā¤• ā¤•ā¤ž ā¤¨ā¤žā¤Ž ā¤Ēā¤ĸā¤ŧ ⤏⤕āĨ‡", + "background_options": "ā¤Ē⤰ā¤ŋā¤ĒāĨā¤°āĨ‡ā¤•āĨā¤ˇāĨā¤¯ ā¤ĩā¤ŋ⤕⤞āĨā¤Ē", "backup": "ā¤ŦāĨˆā¤•⤅ā¤Ē", "backup_album_selection_page_albums_device": "ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸ ā¤Ē⤰ ā¤ā¤˛āĨā¤Ŧā¤Ž ({count})", "backup_album_selection_page_albums_tap": "ā¤ļā¤žā¤Žā¤ŋ⤞ ⤕⤰⤍āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ⤟āĨˆā¤Ē ⤕⤰āĨ‡ā¤‚, ā¤Ŧā¤žā¤šā¤° ⤕⤰⤍āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Ąā¤Ŧ⤞ ⤟āĨˆā¤Ē ⤕⤰āĨ‡ā¤‚", @@ -528,8 +569,10 @@ "backup_album_selection_page_select_albums": "ā¤ā¤˛āĨā¤Ŧā¤Ž ⤚āĨā¤¨āĨ‡ā¤‚", "backup_album_selection_page_selection_info": "⤚⤝⤍ ā¤œā¤žā¤¨ā¤•ā¤žā¤°āĨ€", "backup_album_selection_page_total_assets": "⤕āĨā¤˛ ⤅ā¤ĻāĨā¤ĩā¤ŋ⤤āĨ€ā¤¯ ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋā¤¯ā¤žā¤", + "backup_albums_sync": "ā¤ŦāĨˆā¤•⤅ā¤Ē ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤•ā¤ž ⤤āĨā¤˛āĨā¤¯ā¤•ā¤žā¤˛ā¤¨", "backup_all": "⤏⤭āĨ€", "backup_background_service_backup_failed_message": "⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ā¤•ā¤ž ā¤ŦāĨˆā¤•⤅ā¤Ē ⤞āĨ‡ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞. ā¤ĒāĨā¤¨ā¤ƒ ā¤ĒāĨā¤°ā¤¯ā¤žā¤¸ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤°ā¤šā¤ž ā¤šāĨˆâ€Ļ", + "backup_background_service_complete_notification": "ā¤ā¤¸āĨ‡ā¤Ÿ ā¤•ā¤ž ā¤ŦāĨˆā¤•⤅ā¤Ē ā¤ĒāĨ‚ā¤°ā¤ž ā¤šāĨā¤†", "backup_background_service_connection_failed_message": "⤏⤰āĨā¤ĩ⤰ ⤏āĨ‡ ⤕⤍āĨ‡ā¤•āĨā¤Ÿ ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞. ā¤ĒāĨā¤¨ā¤ƒ ā¤ĒāĨā¤°ā¤¯ā¤žā¤¸ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤°ā¤šā¤ž ā¤šāĨˆâ€Ļ", "backup_background_service_current_upload_notification": "{filename} ⤅ā¤Ē⤞āĨ‹ā¤Ą ā¤šāĨ‹ ā¤°ā¤šā¤ž ā¤šāĨˆ", "backup_background_service_default_notification": "⤍⤈ ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ⤕āĨ€ ā¤œā¤žā¤‚ā¤š ⤕āĨ€ ā¤œā¤ž ā¤°ā¤šāĨ€ ā¤šāĨˆâ€Ļ", @@ -577,6 +620,7 @@ "backup_controller_page_turn_on": "⤅⤗āĨā¤°ā¤­āĨ‚ā¤Žā¤ŋ ā¤ŦāĨˆā¤•⤅ā¤Ē ā¤šā¤žā¤˛āĨ‚ ⤕⤰āĨ‡ā¤‚", "backup_controller_page_uploading_file_info": "ā¤Ģā¤ŧā¤žā¤‡ā¤˛ ā¤œā¤žā¤¨ā¤•ā¤žā¤°āĨ€ ⤅ā¤Ē⤞āĨ‹ā¤Ą ā¤•ā¤°ā¤¨ā¤ž", "backup_err_only_album": "ā¤ā¤•ā¤Žā¤žā¤¤āĨā¤° ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤¨ā¤šāĨ€ā¤‚ ā¤šā¤Ÿā¤žā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤ž", + "backup_error_sync_failed": "⤤āĨā¤˛āĨā¤¯ā¤•ā¤žā¤˛ā¤¨ ā¤ĩā¤ŋā¤Ģ⤞. ā¤ŦāĨˆā¤•⤅ā¤Ē ā¤¸ā¤‚ā¤¸ā¤žā¤§ā¤ŋ⤤ ā¤¨ā¤šāĨ€ā¤‚ ⤕ā¤ŋā¤¯ā¤ž ā¤œā¤ž ā¤¸ā¤•ā¤¤ā¤žāĨ¤", "backup_info_card_assets": "⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ", "backup_manual_cancelled": "⤰ā¤ĻāĨā¤Ļ", "backup_manual_in_progress": "⤅ā¤Ē⤞āĨ‹ā¤Ą ā¤Ēā¤šā¤˛āĨ‡ ⤏āĨ‡ ā¤šāĨ€ ā¤ĒāĨā¤°ā¤—⤤ā¤ŋ ā¤Ē⤰ ā¤šāĨˆāĨ¤ ⤕āĨā¤› ā¤ĻāĨ‡ā¤° ā¤Ŧā¤žā¤Ļ ā¤ĒāĨā¤°ā¤¯ā¤žā¤¸ ⤕⤰āĨ‡ā¤‚", @@ -638,12 +682,16 @@ "change_password_description": "ā¤¯ā¤š ā¤¯ā¤ž ⤤āĨ‹ ā¤Ēā¤šā¤˛āĨ€ ā¤Ŧā¤žā¤° ā¤šāĨˆ ⤜ā¤Ŧ ⤆ā¤Ē ⤏ā¤ŋ⤏āĨā¤Ÿā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤¸ā¤žā¤‡ā¤¨ ⤇⤍ ⤕⤰ ā¤°ā¤šāĨ‡ ā¤šāĨˆā¤‚ ā¤¯ā¤ž ⤆ā¤Ēā¤•ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ā¤Ŧā¤Ļ⤞⤍āĨ‡ ā¤•ā¤ž ⤅⤍āĨā¤°āĨ‹ā¤§ ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨˆāĨ¤", "change_password_form_confirm_password": "ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ⤕āĨ€ ā¤ĒāĨā¤ˇāĨā¤Ÿā¤ŋ ⤕āĨ€ā¤œā¤ŋ⤝āĨ‡", "change_password_form_description": "ā¤¨ā¤Žā¤¸āĨā¤¤āĨ‡ {name},\n\nā¤¯ā¤ž ⤤āĨ‹ ⤆ā¤Ē ā¤Ēā¤šā¤˛āĨ€ ā¤Ŧā¤žā¤° ⤏ā¤ŋ⤏āĨā¤Ÿā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤¸ā¤žā¤‡ā¤¨ ⤇⤍ ⤕⤰ ā¤°ā¤šāĨ‡ ā¤šāĨˆā¤‚ ā¤¯ā¤ž ā¤Ģā¤ŋ⤰ ⤆ā¤Ēā¤•ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ā¤Ŧā¤Ļ⤞⤍āĨ‡ ā¤•ā¤ž ⤅⤍āĨā¤°āĨ‹ā¤§ ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž ā¤šāĨˆāĨ¤ ⤕āĨƒā¤Ēā¤¯ā¤ž ⤍āĨ€ā¤šāĨ‡ ā¤¨ā¤¯ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ā¤Ąā¤žā¤˛āĨ‡ā¤‚āĨ¤", + "change_password_form_log_out": "⤅⤍āĨā¤¯ ⤏⤭āĨ€ ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸ ⤕āĨ‹ ⤞āĨ‰ā¤— ā¤†ā¤‰ā¤Ÿ ⤕⤰āĨ‡ā¤‚", + "change_password_form_log_out_description": "⤅⤍āĨā¤¯ ⤏⤭āĨ€ ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸ ⤏āĨ‡ ⤞āĨ‰ā¤— ā¤†ā¤‰ā¤Ÿ ā¤•ā¤°ā¤¨ā¤ž ⤅⤍āĨā¤ļ⤂⤏ā¤ŋ⤤ ā¤šāĨˆ", "change_password_form_new_password": "ā¤¨ā¤¯ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą", "change_password_form_password_mismatch": "ā¤¸ā¤žā¤‚ā¤•āĨ‡ā¤¤ā¤ŋ⤕ ā¤ļā¤ŦāĨā¤Ļ ā¤ŽāĨ‡ā¤˛ ā¤¨ā¤šāĨ€ā¤‚ ā¤–ā¤žā¤¤āĨ‡", "change_password_form_reenter_new_password": "ā¤¨ā¤¯ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ā¤ĒāĨā¤¨ā¤ƒ ā¤Ļ⤰āĨā¤œ ⤕⤰āĨ‡ā¤‚", "change_pin_code": "ā¤Ēā¤ŋ⤍ ⤕āĨ‹ā¤Ą ā¤Ŧā¤Ļ⤞āĨ‡ā¤‚", "change_your_password": "⤅ā¤Ēā¤¨ā¤ž ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ā¤Ŧā¤Ļ⤞āĨ‡ā¤‚", "changed_visibility_successfully": "ā¤ĻāĨƒā¤ļāĨā¤¯ā¤¤ā¤ž ⤏ā¤Ģā¤˛ā¤¤ā¤žā¤ĒāĨ‚⤰āĨā¤ĩ⤕ ā¤Ē⤰ā¤ŋā¤ĩ⤰āĨā¤¤ā¤ŋ⤤", + "charging": "ā¤šā¤žā¤°āĨā¤œā¤ŋ⤂⤗", + "charging_requirement_mobile_backup": "ā¤Ē⤰ā¤ŋā¤ĒāĨā¤°āĨ‡ā¤•āĨā¤ˇāĨā¤¯ ā¤ŦāĨˆā¤•⤅ā¤Ē ⤕āĨ‡ ⤞ā¤ŋā¤ ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸ ā¤•ā¤ž ā¤šā¤žā¤°āĨā¤œā¤ŋ⤂⤗ ā¤ĒāĨ‡ ⤞⤗āĨ‡ ā¤šāĨ‹ā¤¨ā¤ž ⤆ā¤ĩā¤ļāĨā¤¯ā¤• ā¤šāĨˆ", "check_corrupt_asset_backup": "ā¤ĻāĨ‚⤎ā¤ŋ⤤ ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ ā¤ŦāĨˆā¤•⤅ā¤Ē ⤕āĨ€ ā¤œā¤žā¤ā¤š ⤕⤰āĨ‡ā¤‚", "check_corrupt_asset_backup_button": "ā¤œā¤žā¤ā¤š ⤕⤰āĨ‡ā¤‚", "check_corrupt_asset_backup_description": "ā¤¯ā¤š ā¤œā¤žā¤ā¤š ⤕āĨ‡ā¤ĩ⤞ ā¤ĩā¤žā¤ˆ-ā¤Ģā¤ŧā¤žā¤ˆ ā¤Ē⤰ ā¤šāĨ€ ⤕⤰āĨ‡ā¤‚ ⤔⤰ ⤏⤭āĨ€ ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ā¤•ā¤ž ā¤ŦāĨˆā¤•⤅ā¤Ē ⤞āĨ‡ā¤¨āĨ‡ ⤕āĨ‡ ā¤Ŧā¤žā¤Ļ ā¤šāĨ€ ⤕⤰āĨ‡ā¤‚āĨ¤ ⤇⤏ ā¤ĒāĨā¤°ā¤•āĨā¤°ā¤ŋā¤¯ā¤ž ā¤ŽāĨ‡ā¤‚ ⤕āĨā¤› ā¤Žā¤ŋ⤍⤟ ⤞⤗ ⤏⤕⤤āĨ‡ ā¤šāĨˆā¤‚āĨ¤", @@ -665,7 +713,7 @@ "client_cert_subtitle": "⤕āĨ‡ā¤ĩ⤞ PKCS12 (.p12, .pfx) ā¤Ģā¤ŧāĨ‰ā¤°āĨā¤ŽāĨˆā¤Ÿ ā¤•ā¤ž ā¤¸ā¤Žā¤°āĨā¤Ĩ⤍ ā¤•ā¤°ā¤¤ā¤ž ā¤šāĨˆāĨ¤ ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤Ē⤤āĨā¤° ā¤†ā¤¯ā¤žā¤¤/ā¤šā¤Ÿā¤žā¤ā¤ ⤕āĨ‡ā¤ĩ⤞ ⤞āĨ‰ā¤—ā¤ŋ⤍ ⤏āĨ‡ ā¤Ēā¤šā¤˛āĨ‡ ⤉ā¤Ē⤞ā¤ŦāĨā¤§ ā¤šāĨˆā¤‚", "client_cert_title": "SSL ⤕āĨā¤˛ā¤žā¤‡ā¤‚ā¤Ÿ ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤Ē⤤āĨā¤°", "clockwise": "ā¤Ļ⤕āĨā¤ˇā¤ŋā¤Ŗā¤žā¤ĩ⤰āĨā¤¤", - "close": "ā¤Ŧ⤂ā¤Ļ", + "close": "ā¤Ŧ⤂ā¤Ļ ⤕⤰āĨ‡ā¤‚", "collapse": "⤗ā¤ŋ⤰ ā¤œā¤žā¤¨ā¤ž", "collapse_all": "⤏⤭āĨ€ ⤕āĨ‹ ⤏⤂⤕āĨā¤šā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", "color": "⤰⤂⤗", @@ -675,8 +723,8 @@ "comments_and_likes": "⤟ā¤ŋā¤ĒāĨā¤Ē⤪ā¤ŋā¤¯ā¤žā¤ ⤔⤰ ā¤Ē⤏⤂ā¤Ļ", "comments_are_disabled": "⤟ā¤ŋā¤ĒāĨā¤Ē⤪ā¤ŋā¤¯ā¤žā¤ ⤅⤕āĨā¤ˇā¤Ž ā¤šāĨˆā¤‚", "common_create_new_album": "ā¤¨ā¤¯ā¤ž ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤Ŧā¤¨ā¤žā¤ā¤", - "completed": "ā¤ĒāĨā¤°ā¤ž ā¤šāĨ‹ā¤¨ā¤ž", - "confirm": "ā¤ĒāĨā¤ˇāĨā¤Ÿā¤ŋ", + "completed": "ā¤ĒāĨ‚⤰ā¤ŋ⤤", + "confirm": "ā¤ĒāĨā¤ˇāĨā¤Ÿā¤ŋ ⤕⤰āĨ‡ā¤‚", "confirm_admin_password": "ā¤ā¤Ąā¤Žā¤ŋ⤍ ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ⤕āĨ€ ā¤ĒāĨā¤ˇāĨā¤Ÿā¤ŋ ⤕⤰āĨ‡ā¤‚", "confirm_delete_face": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ā¤ĩā¤žā¤•ā¤ˆ ā¤ā¤¸āĨ‡ā¤Ÿ ⤏āĨ‡ {name} ⤚āĨ‡ā¤šā¤°ā¤ž ā¤šā¤Ÿā¤žā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", "confirm_delete_shared_link": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ā¤ĩā¤žā¤•ā¤ˆ ⤇⤏ ā¤¸ā¤žā¤ā¤ž ⤞ā¤ŋ⤂⤕ ⤕āĨ‹ ā¤šā¤Ÿā¤žā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", @@ -685,13 +733,13 @@ "confirm_password": "ā¤Ēā¤žā¤¸ā¤ĩ⤰āĨā¤Ą ⤕āĨ€ ā¤ĒāĨā¤ˇāĨā¤Ÿā¤ŋ ⤕āĨ€ā¤œā¤ŋ⤝āĨ‡", "confirm_tag_face": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ⤇⤏ ⤚āĨ‡ā¤šā¤°āĨ‡ ⤕āĨ‹ {name} ⤕āĨ‡ ⤰āĨ‚ā¤Ē ā¤ŽāĨ‡ā¤‚ ⤟āĨˆā¤— ā¤•ā¤°ā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", "confirm_tag_face_unnamed": "⤕āĨā¤¯ā¤ž ⤆ā¤Ē ⤇⤏ ⤚āĨ‡ā¤šā¤°āĨ‡ ⤕āĨ‹ ⤟āĨˆā¤— ā¤•ā¤°ā¤¨ā¤ž ā¤šā¤žā¤šā¤¤āĨ‡ ā¤šāĨˆā¤‚?", - "connected_device": "⤕⤍āĨ‡ā¤•āĨā¤ŸāĨ‡ā¤Ą ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸", + "connected_device": "⤝āĨ‹ā¤œā¤ŋ⤤ ⤝⤂⤤āĨā¤°", "connected_to": "⤏āĨ‡ ⤜āĨā¤Ąā¤ŧā¤ž", "contain": "ā¤¸ā¤Žā¤žā¤šā¤ŋ⤤", "context": "⤏⤂ā¤Ļ⤰āĨā¤­", "continue": "ā¤œā¤žā¤°āĨ€", "control_bottom_app_bar_create_new_album": "ā¤¨ā¤¯ā¤ž ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤Ŧā¤¨ā¤žā¤ā¤", - "control_bottom_app_bar_delete_from_immich": "Immich ⤏āĨ‡ ā¤šā¤Ÿā¤žā¤ā¤‚", + "control_bottom_app_bar_delete_from_immich": "ā¤‡ā¤ŽāĨā¤Žā¤ŋ⤚ ⤏āĨ‡ ā¤šā¤Ÿā¤žā¤ā¤‚", "control_bottom_app_bar_delete_from_local": "ā¤Ąā¤ŋā¤ĩā¤žā¤‡ā¤¸ ⤏āĨ‡ ā¤šā¤Ÿā¤žā¤ā¤‚", "control_bottom_app_bar_edit_location": "⤏āĨā¤Ĩā¤žā¤¨ ⤏⤂ā¤Ēā¤žā¤Ļā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", "control_bottom_app_bar_edit_time": "ā¤¤ā¤žā¤°āĨ€ā¤– ⤔⤰ ā¤¸ā¤Žā¤¯ ⤏⤂ā¤Ēā¤žā¤Ļā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", @@ -713,6 +761,7 @@ "create": "⤤āĨˆā¤¯ā¤žā¤° ⤕⤰āĨ‡ā¤‚", "create_album": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤Ŧā¤¨ā¤žā¤“", "create_album_page_untitled": "ā¤ļāĨ€ā¤°āĨā¤ˇā¤•ā¤šāĨ€ā¤¨", + "create_api_key": "⤐.ā¤ĒāĨ€.ā¤†ā¤ˆ. ā¤šā¤žā¤­āĨ€ ā¤Ŧā¤¨ā¤žā¤ā¤‚", "create_library": "ā¤˛ā¤žā¤‡ā¤ŦāĨā¤°āĨ‡ā¤°āĨ€ ā¤Ŧā¤¨ā¤žā¤ā¤‚", "create_link": "⤞ā¤ŋ⤂⤕ ā¤Ŧā¤¨ā¤žā¤ā¤‚", "create_link_to_share": "ā¤ļāĨ‡ā¤¯ā¤° ⤕⤰⤍āĨ‡ ⤕āĨ‡ ⤞ā¤ŋā¤ ⤞ā¤ŋ⤂⤕ ā¤Ŧā¤¨ā¤žā¤ā¤‚", @@ -729,6 +778,7 @@ "create_user": "⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤ž ā¤Ŧā¤¨ā¤žā¤‡ā¤¯āĨ‡", "created": "ā¤Ŧā¤¨ā¤žā¤¯ā¤ž", "created_at": "ā¤Ŧā¤¨ā¤žā¤¯ā¤ž ā¤Ĩā¤ž", + "creating_linked_albums": "⤜āĨāĨœāĨ‡ ā¤šāĨā¤ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤Ŧā¤¨ā¤žā¤ ā¤œā¤ž ā¤°ā¤šāĨ‡ ā¤šāĨˆā¤‚..āĨ¤", "crop": "ā¤›ā¤žā¤ā¤ŸāĨ‡ā¤‚", "curated_object_page_title": "⤚āĨ€ā¤œā¤ŧāĨ‡ā¤‚", "current_device": "ā¤ĩ⤰āĨā¤¤ā¤Žā¤žā¤¨ ⤉ā¤Ē⤕⤰⤪", @@ -741,6 +791,7 @@ "daily_title_text_date_year": "⤈, ā¤ā¤Žā¤ā¤Žā¤ā¤Ž ā¤Ļā¤ŋ⤍, ā¤ĩ⤰āĨā¤ˇ", "dark": "ā¤Ąā¤žā¤°āĨā¤•", "dark_theme": "ā¤Ąā¤žā¤°āĨā¤• ā¤ĨāĨ€ā¤Ž ⤟āĨ‰ā¤—⤞ ⤕⤰āĨ‡ā¤‚", + "date": "ā¤Ļā¤ŋā¤¨ā¤žā¤‚ā¤•", "date_after": "⤇⤏⤕āĨ‡ ā¤Ŧā¤žā¤Ļ ⤕āĨ€ ā¤¤ā¤žā¤°āĨ€ā¤–", "date_and_time": "⤤ā¤ŋā¤Ĩā¤ŋ ⤔⤰ ā¤¸ā¤Žā¤¯", "date_before": "ā¤Ēā¤šā¤˛āĨ‡ ⤕āĨ€ ā¤¤ā¤žā¤°āĨ€ā¤–", @@ -748,6 +799,7 @@ "date_of_birth_saved": "⤜⤍āĨā¤Žā¤¤ā¤ŋā¤Ĩā¤ŋ ⤏ā¤Ģā¤˛ā¤¤ā¤žā¤ĒāĨ‚⤰āĨā¤ĩ⤕ ā¤¸ā¤šāĨ‡ā¤œāĨ€ ā¤—ā¤ˆ", "date_range": "⤤ā¤ŋā¤Ĩā¤ŋ ⤏āĨ€ā¤Žā¤ž", "day": "ā¤Ļā¤ŋ⤍", + "days": "ā¤Ļā¤ŋ⤍", "deduplicate_all": "⤏⤭āĨ€ ⤕āĨ‹ ā¤ĄāĨā¤ĒāĨā¤˛ā¤ŋ⤕āĨ‡ā¤Ÿ ⤕⤰āĨ‡ā¤‚", "deduplication_criteria_1": "⤛ā¤ĩā¤ŋ ā¤•ā¤ž ā¤†ā¤•ā¤žā¤° ā¤Ŧā¤žā¤‡ā¤ŸāĨā¤¸ ā¤ŽāĨ‡ā¤‚", "deduplication_criteria_2": "EXIF ā¤ĄāĨ‡ā¤Ÿā¤ž ⤕āĨ€ ⤏⤂⤖āĨā¤¯ā¤ž", @@ -836,6 +888,8 @@ "edit_date": "⤏⤂ā¤Ēā¤žā¤Ļ⤍ ⤕āĨ€ ā¤¤ā¤žā¤°āĨ€ā¤–", "edit_date_and_time": "ā¤Ļā¤ŋā¤¨ā¤žā¤‚ā¤• ⤔⤰ ā¤¸ā¤Žā¤¯ ⤏⤂ā¤Ēā¤žā¤Ļā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", "edit_date_and_time_action_prompt": "{count} ā¤¤ā¤žā¤°āĨ€ā¤– ⤔⤰ ā¤¸ā¤Žā¤¯ ⤏⤂ā¤Ēā¤žā¤Ļā¤ŋ⤤ ⤕ā¤ŋā¤ ā¤—ā¤", + "edit_date_and_time_by_offset": "⤅⤂⤕āĨā¤° ⤏āĨ‡ ā¤Ļā¤ŋā¤¨ā¤žā¤‚ā¤• ā¤Ŧā¤Ļ⤞āĨ‡ā¤‚", + "edit_date_and_time_by_offset_interval": "⤍⤝āĨ€ ā¤Ļā¤ŋā¤¨ā¤žā¤‚ā¤• ⤏āĨ€ā¤Žā¤ž: {from} - {to}", "edit_description": "⤏⤂ā¤Ēā¤žā¤Ļā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚ ā¤ĩ⤰āĨā¤Ŗā¤¨", "edit_description_prompt": "⤕āĨƒā¤Ēā¤¯ā¤ž ā¤ā¤• ā¤¨ā¤¯ā¤ž ā¤ĩā¤ŋā¤ĩ⤰⤪ ⤚āĨā¤¨āĨ‡ā¤‚:", "edit_exclusion_pattern": "ā¤Ŧā¤šā¤ŋ⤎āĨā¤•⤰⤪ ā¤ĒāĨˆā¤Ÿā¤°āĨā¤¨ ⤏⤂ā¤Ēā¤žā¤Ļā¤ŋ⤤ ⤕⤰āĨ‡ā¤‚", @@ -874,7 +928,9 @@ "error": "⤗⤞⤤āĨ€", "error_change_sort_album": "ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤•ā¤ž ⤕āĨā¤°ā¤Ž ā¤Ŧā¤Ļ⤞⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤅⤏ā¤Ģ⤞ ā¤°ā¤šā¤ž", "error_delete_face": "ā¤ā¤¸āĨ‡ā¤Ÿ ⤏āĨ‡ ⤚āĨ‡ā¤šā¤°āĨ‡ ⤕āĨ‹ ā¤šā¤Ÿā¤žā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤤āĨā¤°āĨā¤Ÿā¤ŋ ā¤šāĨā¤ˆ", + "error_getting_places": "⤏āĨā¤Ĩā¤žā¤¨āĨ‹ā¤‚ ⤕āĨ‹ ā¤ĒāĨā¤°ā¤žā¤ĒāĨā¤¤ ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤤āĨā¤°āĨā¤Ÿā¤ŋ ā¤šāĨā¤ˆ", "error_loading_image": "⤛ā¤ĩā¤ŋ ⤞āĨ‹ā¤Ą ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤤āĨā¤°āĨā¤Ÿā¤ŋ", + "error_loading_partners": "⤜āĨ‹āĨœāĨ€ā¤Ļā¤žā¤° ⤞āĨ‹ā¤Ą ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤤āĨā¤°āĨā¤Ÿā¤ŋ ā¤šāĨā¤ˆ: {error}", "error_saving_image": "⤤āĨā¤°āĨā¤Ÿā¤ŋ: {error}", "error_tag_face_bounding_box": "⤚āĨ‡ā¤šā¤°āĨ‡ ⤕āĨ‹ ⤟āĨˆā¤— ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤤āĨā¤°āĨā¤Ÿā¤ŋ – ā¤Ŧā¤žā¤‰ā¤‚ā¤Ąā¤ŋ⤂⤗ ā¤ŦāĨ‰ā¤•āĨā¤¸ ⤍ā¤ŋ⤰āĨā¤ĻāĨ‡ā¤ļā¤žā¤‚ā¤• ā¤ĒāĨā¤°ā¤žā¤ĒāĨā¤¤ ā¤¨ā¤šāĨ€ā¤‚ ⤕⤰ ⤏⤕āĨ‡", "error_title": "⤤āĨā¤°āĨā¤Ÿā¤ŋ - ⤕āĨā¤› ⤗⤞⤤ ā¤šāĨ‹ ā¤—ā¤¯ā¤ž", @@ -907,6 +963,7 @@ "failed_to_load_notifications": "⤏āĨ‚ā¤šā¤¨ā¤žā¤ā¤ ⤞āĨ‹ā¤Ą ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", "failed_to_load_people": "⤞āĨ‹ā¤—āĨ‹ā¤‚ ⤕āĨ‹ ⤞āĨ‹ā¤Ą ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", "failed_to_remove_product_key": "⤉⤤āĨā¤Ēā¤žā¤Ļ ⤕āĨā¤‚ā¤œāĨ€ ⤍ā¤ŋā¤•ā¤žā¤˛ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", + "failed_to_reset_pin_code": "ā¤Ēā¤ŋ⤍ ⤕āĨ‹ā¤Ą ⤰āĨ€ā¤¸āĨ‡ā¤Ÿ ā¤•ā¤°ā¤¨ā¤ž ā¤ĩā¤ŋā¤Ģ⤞ ā¤šāĨā¤†", "failed_to_stack_assets": "ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ā¤•ā¤ž ā¤ĸāĨ‡ā¤° ā¤˛ā¤—ā¤žā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", "failed_to_unstack_assets": "ā¤Ē⤰ā¤ŋ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ⤝āĨ‹ā¤‚ ā¤•ā¤ž ā¤ĸāĨ‡ā¤° ⤖āĨ‹ā¤˛ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", "failed_to_update_notification_status": "⤏āĨ‚ā¤šā¤¨ā¤ž ⤕āĨ€ ⤏āĨā¤Ĩā¤ŋ⤤ā¤ŋ ⤅ā¤Ēā¤ĄāĨ‡ā¤Ÿ ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", @@ -915,6 +972,7 @@ "paths_validation_failed": "{paths, plural, one {# ā¤Ēā¤Ĩ} other {# ā¤Ēā¤Ĩ}} ⤏⤤āĨā¤¯ā¤žā¤Ē⤍ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞ ā¤°ā¤šāĨ‡", "profile_picture_transparent_pixels": "ā¤ĒāĨā¤°āĨ‹ā¤Ģā¤ŧā¤žā¤‡ā¤˛ ⤚ā¤ŋ⤤āĨā¤°āĨ‹ā¤‚ ā¤ŽāĨ‡ā¤‚ ā¤Ēā¤žā¤°ā¤Ļ⤰āĨā¤ļāĨ€ ā¤Ēā¤ŋ⤕āĨā¤¸āĨ‡ā¤˛ ā¤¨ā¤šāĨ€ā¤‚ ā¤šāĨ‹ ⤏⤕⤤āĨ‡āĨ¤", "quota_higher_than_disk_size": "⤆ā¤Ē⤍āĨ‡ ā¤Ąā¤ŋ⤏āĨā¤• ā¤†ā¤•ā¤žā¤° ⤏āĨ‡ ⤅⤧ā¤ŋ⤕ ⤕āĨ‹ā¤Ÿā¤ž ⤍ā¤ŋ⤰āĨā¤§ā¤žā¤°ā¤ŋ⤤ ⤕ā¤ŋā¤¯ā¤ž ā¤šāĨˆ", + "something_went_wrong": "⤕āĨā¤› ⤤āĨā¤°āĨā¤Ÿā¤ŋ ā¤šāĨā¤ˆ", "unable_to_add_album_users": "⤉ā¤Ē⤝āĨ‹ā¤—⤕⤰āĨā¤¤ā¤žā¤“⤂ ⤕āĨ‹ ā¤ā¤˛āĨā¤Ŧā¤Ž ā¤ŽāĨ‡ā¤‚ ā¤Ąā¤žā¤˛ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤…ā¤¸ā¤Žā¤°āĨā¤Ĩ", "unable_to_add_assets_to_shared_link": "ā¤¸ā¤žā¤ā¤ž ⤞ā¤ŋ⤂⤕ ā¤ŽāĨ‡ā¤‚ ⤏⤂ā¤Ē⤤āĨā¤¤ā¤ŋ ā¤Ąā¤žā¤˛ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤…ā¤¸ā¤Žā¤°āĨā¤Ĩ", "unable_to_add_comment": "⤟ā¤ŋā¤ĒāĨā¤Ē⤪āĨ€ ā¤Ąā¤žā¤˛ā¤¨āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤…ā¤¸ā¤Žā¤°āĨā¤Ĩ", @@ -1000,22 +1058,42 @@ }, "exif": "ā¤ā¤•āĨā¤¸ā¤ŋā¤Ģ", "exif_bottom_sheet_description": "ā¤ĩā¤ŋā¤ĩ⤰⤪ ⤜āĨ‹ā¤Ąā¤ŧāĨ‡ā¤‚..āĨ¤", + "exif_bottom_sheet_description_error": "ā¤ĩā¤ŋā¤ĩ⤰⤪ ⤕āĨ‡ ⤆⤧āĨā¤¨āĨ€ā¤•⤰⤪ ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ⤤āĨā¤°āĨā¤Ÿā¤ŋ ā¤šāĨā¤ˆ", + "exif_bottom_sheet_details": "ā¤ĩā¤ŋā¤ĩ⤰⤪", + "exif_bottom_sheet_location": "⤏āĨā¤Ĩā¤žā¤¨", + "exif_bottom_sheet_no_description": "⤕āĨ‹ā¤ˆ ā¤ĩā¤ŋā¤ĩ⤰⤪ ā¤¨ā¤šāĨ€ā¤‚", + "exif_bottom_sheet_people": "⤞āĨ‹ā¤—", "exif_bottom_sheet_person_add_person": "ā¤¨ā¤žā¤Ž ā¤Ąā¤žā¤˛āĨ‡ā¤‚", "exit_slideshow": "⤏āĨā¤˛ā¤žā¤‡ā¤Ą ā¤ļāĨ‹ ⤏āĨ‡ ā¤Ŧā¤žā¤šā¤° ⤍ā¤ŋ⤕⤞āĨ‡ā¤‚", "expand_all": "⤏⤭āĨ€ ā¤•ā¤ž ā¤ĩā¤ŋ⤏āĨā¤¤ā¤žā¤°", + "experimental_settings_new_asset_list_subtitle": "ā¤•ā¤žā¤°āĨā¤¯ ā¤ĒāĨā¤°ā¤—⤤ā¤ŋ ā¤Ē⤰ ā¤šāĨˆ", + "experimental_settings_new_asset_list_title": "ā¤ĒāĨā¤°ā¤¯āĨ‹ā¤—ā¤žā¤¤āĨā¤Žā¤• ā¤ĢāĨ‹ā¤ŸāĨ‹ ⤗āĨā¤°ā¤ŋā¤Ą ⤏⤕āĨā¤ˇā¤Ž ⤕⤰āĨ‡ā¤‚", + "experimental_settings_subtitle": "⤅ā¤Ē⤍āĨ‡ ⤜āĨ‹ā¤–ā¤ŋā¤Ž ā¤Ē⤰ ⤉ā¤Ē⤝āĨ‹ā¤— ⤕⤰āĨ‡ā¤‚!", + "experimental_settings_title": "ā¤ĒāĨā¤°ā¤¯āĨ‹ā¤—ā¤žā¤¤āĨā¤Žā¤•", "expire_after": "ā¤ā¤•āĨā¤¸ā¤Ēā¤žā¤¯ā¤° ⤆ā¤ĢāĨā¤Ÿā¤°", "expired": "⤖⤤āĨā¤Ž ā¤šāĨ‹ ⤚āĨā¤•ā¤ž", + "expires_date": "{date} ⤕āĨ‹ ā¤¸ā¤Žā¤žā¤ĒāĨā¤¤ ā¤šāĨ‹ ā¤°ā¤šā¤ž ā¤šāĨˆ", "explore": "⤅⤍āĨā¤ĩāĨ‡ā¤ˇā¤Ŗ ā¤•ā¤°ā¤¨ā¤ž", + "explorer": "ā¤¸ā¤Žā¤¨āĨā¤ĩāĨ‡ā¤ˇā¤•", "export": "⤍ā¤ŋ⤰āĨā¤¯ā¤žā¤¤", "export_as_json": "JSON ⤕āĨ‡ ⤰āĨ‚ā¤Ē ā¤ŽāĨ‡ā¤‚ ⤍ā¤ŋ⤰āĨā¤¯ā¤žā¤¤ ⤕⤰āĨ‡ā¤‚", + "export_database": "ā¤ĄāĨ‡ā¤Ÿā¤žā¤ŦāĨ‡ā¤¸ ⤍ā¤ŋ⤰āĨā¤¯ā¤žā¤¤ ⤕⤰āĨ‡ā¤‚", + "export_database_description": "⤇⤏.⤕āĨā¤¯āĨ‚.ā¤˛ā¤žā¤‡ā¤Ÿ ā¤ĄāĨ‡ā¤Ÿā¤žā¤ŦāĨ‡ā¤¸ ⤍ā¤ŋ⤰āĨā¤¯ā¤žā¤¤ ⤕⤰āĨ‡ā¤‚", "extension": "ā¤ĩā¤ŋ⤏āĨā¤¤ā¤žā¤°", "external": "ā¤Ŧā¤žā¤šā¤°āĨ€", "external_libraries": "ā¤Ŧā¤žā¤šā¤°āĨ€ ā¤ĒāĨā¤¸āĨā¤¤ā¤•ā¤žā¤˛ā¤¯", + "external_network": "ā¤Ŧā¤žā¤šā¤°āĨ€ ⤍āĨ‡ā¤Ÿā¤ĩ⤰āĨā¤•", "external_network_sheet_info": "When not on the preferred WiFi network, the app will connect to the server through the first of the below URLs it can reach, starting from top to bottom", "face_unassigned": "⤏āĨŒā¤‚ā¤ĒāĨ‡ ā¤¨ā¤šāĨ€ā¤‚ ā¤—ā¤", + "failed": "ā¤ĩā¤ŋā¤Ģ⤞ ā¤šāĨā¤†", + "failed_to_authenticate": "ā¤ĒāĨā¤°ā¤Žā¤žā¤Ŗā¤ŋ⤤ ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", + "failed_to_load_assets": "ā¤ā¤¸āĨ‡ā¤Ÿ ⤞āĨ‹ā¤Ą ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", + "failed_to_load_folder": "ā¤ĢāĨ‹ā¤˛āĨā¤Ąā¤° ⤞āĨ‹ā¤Ą ⤕⤰⤍āĨ‡ ā¤ŽāĨ‡ā¤‚ ā¤ĩā¤ŋā¤Ģ⤞", "favorite": "ā¤Ē⤏⤂ā¤ĻāĨ€ā¤Ļā¤ž", + "favorite_action_prompt": "{count} ā¤Ē⤏⤂ā¤ĻāĨ€ā¤Ļā¤ž ⤏⤂⤕⤞⤍ ā¤ŽāĨ‡ā¤‚ ⤜āĨ‹āĨœāĨ‡ ā¤—ā¤", "favorite_or_unfavorite_photo": "ā¤Ē⤏⤂ā¤ĻāĨ€ā¤Ļā¤ž ā¤¯ā¤ž ā¤¨ā¤žā¤Ē⤏⤂ā¤Ļ ā¤ĢāĨ‹ā¤ŸāĨ‹", "favorites": "ā¤Ē⤏⤂ā¤ĻāĨ€ā¤Ļā¤ž", + "favorites_page_no_favorites": "⤕āĨ‹ā¤ˆ ā¤Ē⤏⤂ā¤ĻāĨ€ā¤Ļā¤ž ā¤ā¤¸āĨ‡ā¤Ÿ ā¤¨ā¤šāĨ€ā¤‚ ā¤Žā¤ŋ⤞āĨ‡", "feature_photo_updated": "ā¤Ģā¤ŧāĨ€ā¤šā¤° ā¤Ģā¤ŧāĨ‹ā¤ŸāĨ‹ ⤅ā¤Ēā¤ĄāĨ‡ā¤Ÿ ⤕ā¤ŋā¤¯ā¤ž ā¤—ā¤¯ā¤ž", "file_name": "ā¤Ģā¤ŧā¤žā¤‡ā¤˛ ā¤•ā¤ž ā¤¨ā¤žā¤Ž", "file_name_or_extension": "ā¤Ģā¤ŧā¤žā¤‡ā¤˛ ā¤•ā¤ž ā¤¨ā¤žā¤Ž ā¤¯ā¤ž ā¤ā¤•āĨā¤¸ā¤ŸāĨ‡ā¤‚ā¤ļ⤍", diff --git a/i18n/nb_NO.json b/i18n/nb_NO.json index 281c1c266f..071dd27a16 100644 --- a/i18n/nb_NO.json +++ b/i18n/nb_NO.json @@ -1716,6 +1716,7 @@ "running": "Kjører", "save": "Lagre", "save_to_gallery": "Lagre til galleriet", + "saved": "Lagret", "saved_api_key": "Lagret API-nøkkel", "saved_profile": "Lagret profil", "saved_settings": "Lagret instillinger", @@ -1732,7 +1733,7 @@ "search_by_description_example": "Turdag i Sapa", "search_by_filename": "Søk etter filnavn og filtype", "search_by_filename_example": "f.eks. IMG_1234.JPG eller PNG", - "search_by_ocr": "Søk med OCR", + "search_by_ocr": "Søk etter tekst i bilde", "search_by_ocr_example": "Latte", "search_camera_lens_model": "Søk etter objektivmodell...", "search_camera_make": "Søk etter kameramerke...", diff --git a/i18n/pl.json b/i18n/pl.json index 0302eeafae..8bbefef148 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -1716,6 +1716,7 @@ "running": "W trakcie", "save": "Zapisz", "save_to_gallery": "Zapisz w galerii", + "saved": "Zapisano", "saved_api_key": "Zapisany klucz API", "saved_profile": "Zapisany profil", "saved_settings": "Zapisane ustawienia", diff --git a/i18n/pt.json b/i18n/pt.json index e3bbb97965..4e04331ad3 100644 --- a/i18n/pt.json +++ b/i18n/pt.json @@ -344,7 +344,7 @@ "transcoding_hardware_acceleration": "AceleraÃ§ÃŖo de hardware", "transcoding_hardware_acceleration_description": "Experimental; transcodificaÃ§ÃŖo mais rÃĄpida, mas poderÃĄ ter qualidade inferior com a mesma taxa de bits", "transcoding_hardware_decoding": "DecodificaÃ§ÃŖo de hardware", - "transcoding_hardware_decoding_setting_description": "Permite a aceleraÃ§ÃŖo ponta a ponta em vez de apenas acelerar a codificaÃ§ÃŖo. Pode nÃŖo funcionar em todos os formatos de arquivo.", + "transcoding_hardware_decoding_setting_description": "Permite a aceleraÃ§ÃŖo ponta a ponta em vez de apenas acelerar a codificaÃ§ÃŖo. Pode nÃŖo funcionar em todos os videos.", "transcoding_max_b_frames": "MÃĄximo de quadros B", "transcoding_max_b_frames_description": "Valores mais altos melhoram a eficiÃĒncia da compressÃŖo, mas tornam a codificaÃ§ÃŖo mais lenta. Pode nÃŖo ser compatível com aceleraÃ§ÃŖo de hardware em dispositivos mais antigos. 0 desativa os quadros B, enquanto -1 define esse valor automaticamente.", "transcoding_max_bitrate": "Taxa de bits mÃĄxima", @@ -455,7 +455,7 @@ "album_viewer_appbar_delete_confirm": "Tem certeza que deseja excluir este ÃĄlbum da sua conta?", "album_viewer_appbar_share_err_delete": "Ocorreu um erro ao eliminar ÃĄlbum", "album_viewer_appbar_share_err_leave": "Ocorreu um erro ao sair do ÃĄlbum", - "album_viewer_appbar_share_err_remove": "Houveram problemas ao remover arquivos do ÃĄlbum", + "album_viewer_appbar_share_err_remove": "Ocorreu um erro ao remover ficheiros do ÃĄlbum", "album_viewer_appbar_share_err_title": "Ocorreu um erro ao alterar o título do ÃĄlbum", "album_viewer_appbar_share_leave": "Deixar ÃĄlbum", "album_viewer_appbar_share_to": "Compartilhar com", @@ -494,7 +494,7 @@ "archive": "Arquivo", "archive_action_prompt": "{count} adicionados ao Arquivo", "archive_or_unarchive_photo": "Arquivar ou desarquivar foto", - "archive_page_no_archived_assets": "Nenhum arquivo encontrado", + "archive_page_no_archived_assets": "Nenhum ficheiro arquivado encontrado", "archive_page_title": "Arquivo ({count})", "archive_size": "Tamanho do arquivo", "archive_size_description": "Configure o tamanho do arquivo para transferÃĒncias (em GiB)", @@ -502,8 +502,8 @@ "archived_count": "{count, plural, one {#Arquivado # item} other {Arquivados # itens}}", "are_these_the_same_person": "Estas pessoas sÃŖo a mesma pessoa?", "are_you_sure_to_do_this": "Tem a certeza de que quer fazer isto?", - "asset_action_delete_err_read_only": "NÃŖo Ê possível excluir arquivo sÃŗ leitura, ignorando", - "asset_action_share_err_offline": "NÃŖo foi possível obter os arquivos offline, ignorando", + "asset_action_delete_err_read_only": "NÃŖo Ê possível eliminar ficheiro sÃŗ de leitura, a ignorar", + "asset_action_share_err_offline": "NÃŖo foi possível obter os ficheiros offline, a ignorar", "asset_added_to_album": "Adicionado ao ÃĄlbum", "asset_adding_to_album": "A adicionar ao ÃĄlbumâ€Ļ", "asset_description_updated": "A descriÃ§ÃŖo do ficheiro foi atualizada", @@ -513,14 +513,14 @@ "asset_list_group_by_sub_title": "Agrupar por", "asset_list_layout_settings_dynamic_layout_title": "Layout dinÃĸmico", "asset_list_layout_settings_group_automatically": "AutomÃĄtico", - "asset_list_layout_settings_group_by": "Agrupar arquivos por", + "asset_list_layout_settings_group_by": "Agrupar ficheiros por", "asset_list_layout_settings_group_by_month_day": "MÃĒs + dia", "asset_list_layout_sub_title": "DisposiÃ§ÃŖo", "asset_list_settings_subtitle": "ConfiguraçÃĩes de disposiÃ§ÃŖo da grade de fotos", "asset_list_settings_title": "Grade de fotos", "asset_offline": "Ficheiro Indisponível", "asset_offline_description": "Este ficheiro externo deixou de estar disponível no disco. Contacte o seu administrador do Immich para obter ajuda.", - "asset_restored_successfully": "Arquivo restaurado com sucesso", + "asset_restored_successfully": "FIcheiro restaurado com sucesso", "asset_skipped": "Ignorado", "asset_skipped_in_trash": "Na reciclagem", "asset_trashed": "Ficheiro apagado", @@ -565,19 +565,19 @@ "backup": "CÃŗpia de segurança", "backup_album_selection_page_albums_device": "Álbuns no dispositivo ({count})", "backup_album_selection_page_albums_tap": "Toque para incluir, duplo toque para excluir", - "backup_album_selection_page_assets_scatter": "Os arquivos podem estar espalhados em vÃĄrios ÃĄlbuns. Assim, os ÃĄlbuns podem ser incluídos ou excluídos durante o processo de backup.", + "backup_album_selection_page_assets_scatter": "Os ficheros podem estar espalhados por vÃĄrios ÃĄlbuns. Desta forma, os ÃĄlbuns podem ser incluídos ou excluídos durante o processo de cÃŗpia de segurança.", "backup_album_selection_page_select_albums": "Selecione Álbuns", "backup_album_selection_page_selection_info": "InformaçÃĩes da SeleÃ§ÃŖo", - "backup_album_selection_page_total_assets": "Total de arquivos Ãēnicos", + "backup_album_selection_page_total_assets": "Total de ficheiros Ãēnicos", "backup_albums_sync": "CÃŗpia de segurança de sincronizaÃ§ÃŖo de ÃĄlbuns", "backup_all": "Tudo", "backup_background_service_backup_failed_message": "Ocorreu um erro ao efetuar cÃŗpia de segurança dos ficheiros. A tentar de novoâ€Ļ", "backup_background_service_complete_notification": "CÃŗpia de conteÃēdos concluída", "backup_background_service_connection_failed_message": "Ocorreu um erro na ligaÃ§ÃŖo ao servidor. A tentar de novoâ€Ļ", "backup_background_service_current_upload_notification": "A enviar {filename}", - "backup_background_service_default_notification": "Verificando novos arquivosâ€Ļ", + "backup_background_service_default_notification": "A verificar se hÃĄ novos ficheirosâ€Ļ", "backup_background_service_error_title": "Erro de backup", - "backup_background_service_in_progress_notification": "Fazendo backup dos arquivosâ€Ļ", + "backup_background_service_in_progress_notification": "A fazer cÃŗpia de segurança dos seus ficheirosâ€Ļ", "backup_background_service_upload_failure_notification": "Ocorreu um erro ao enviar {filename}", "backup_controller_page_albums": "Backup Álbuns", "backup_controller_page_background_app_refresh_disabled_content": "Para utilizar a cÃŗpia de segurança em segundo plano, ative a atualizaÃ§ÃŖo da aplicaÃ§ÃŖo em segundo plano em DefiniçÃĩes > Geral > AtualizaÃ§ÃŖo da aplicaÃ§ÃŖo em segundo plano.", @@ -600,7 +600,7 @@ "backup_controller_page_backup_selected": "Selecionado: ", "backup_controller_page_backup_sub": "Fotos e vídeos salvos em backup", "backup_controller_page_created": "Criado em: {date}", - "backup_controller_page_desc_backup": "Ative o backup para enviar automÃĄticamente novos arquivos para o servidor.", + "backup_controller_page_desc_backup": "Ative a cÃŗpia de segurança em primeiro plano para enviar novos ficheiros automaticamente ao abrir a aplicaÃ§ÃŖo.", "backup_controller_page_excluded": "Eliminado: ", "backup_controller_page_failed": "Falhou ({count})", "backup_controller_page_filename": "Nome do ficheiro: {filename} [{size}]", @@ -618,10 +618,10 @@ "backup_controller_page_total_sub": "Todas as fotos e vídeos dos ÃĄlbuns selecionados", "backup_controller_page_turn_off": "Desativar backup", "backup_controller_page_turn_on": "Ativar backup", - "backup_controller_page_uploading_file_info": "Enviando arquivo", + "backup_controller_page_uploading_file_info": "A enviar informaçÃĩes do ficheiro", "backup_err_only_album": "NÃŖo Ê possível remover apenas o ÃĄlbum", "backup_error_sync_failed": "A sincronizaÃ§ÃŖo falhou. NÃŖo Ê possível fazer a cÃŗpia de segurança.", - "backup_info_card_assets": "arquivos", + "backup_info_card_assets": "ficheiros", "backup_manual_cancelled": "Cancelado", "backup_manual_in_progress": "Envio jÃĄ estÃĄ em progresso. Tente novamente mais tarde", "backup_manual_success": "Sucesso", @@ -694,7 +694,7 @@ "charging_requirement_mobile_backup": "CÃŗpia de segurança de fundo necessita que o dispositivo esteja a carregar", "check_corrupt_asset_backup": "Verificar por backups corrompidos", "check_corrupt_asset_backup_button": "Verificar", - "check_corrupt_asset_backup_description": "Execute esta verificaÃ§ÃŖo somente em uma rede Wi-Fi e quando o backup de todos os arquivos jÃĄ estiver concluído. O processo demora alguns minutos.", + "check_corrupt_asset_backup_description": "Execute esta verificaÃ§ÃŖo apenas numa rede Wi-Fi e quando a cÃŗpia de segurança de todos os ficheiros jÃĄ estiver concluída. O processo pode demorar alguns minutos.", "check_logs": "Verificar registos", "choose_matching_people_to_merge": "Escolha pessoas correspondentes para unir", "city": "Cidade/Localidade", @@ -770,7 +770,7 @@ "create_new_person": "Criar nova pessoa", "create_new_person_hint": "Associe os ficheiros a uma nova pessoa", "create_new_user": "Criar novo utilizador", - "create_shared_album_page_share_add_assets": "ADICIONAR ARQUIVOS", + "create_shared_album_page_share_add_assets": "ADICIONAR FICHEIROS", "create_shared_album_page_share_select_photos": "Selecionar Fotos", "create_shared_link": "Criar link partilhado", "create_tag": "Criar etiqueta", @@ -812,10 +812,10 @@ "delete_action_prompt": "{count} eliminados", "delete_album": "Apagar ÃĄlbum", "delete_api_key_prompt": "Tem a certeza de que deseja remover esta chave de API?", - "delete_dialog_alert": "Esses arquivos serÃŖo permanentemente apagados do Immich e de seu dispositivo", - "delete_dialog_alert_local": "Estes arquivos serÃŖo permanentemente excluídos do seu dispositivo, mas continuarÃŖo disponíveis no servidor Immich", - "delete_dialog_alert_local_non_backed_up": "NÃŖo hÃĄ backup de alguns dos arquivos no servidor e eles serÃŖo excluídos permanentemente do seu dispositivo", - "delete_dialog_alert_remote": "Estes arquivos serÃŖo permanentemente excluídos do servidor Immich", + "delete_dialog_alert": "Estes ficheiros serÃŖo eliminados permanentemente do Immich e do seu dispositivo", + "delete_dialog_alert_local": "Estes ficheiros serÃŖo eliminados permanentemente do seu dispositivo, mas continuarÃŖo disponíveis no servidor Immich", + "delete_dialog_alert_local_non_backed_up": "Alguns dos ficheiros nÃŖo tÃĒm cÃŗpia de segurança no Immich e serÃŖo eliminados permanentemente do seu dispositivo", + "delete_dialog_alert_remote": "Estes ficheiros serÃŖo eliminados permanentemente do servidor Immich", "delete_dialog_ok_force": "Confirmo que quero excluir", "delete_dialog_title": "Excluir Permanentemente", "delete_duplicates_confirmation": "Tem a certeza de que deseja eliminar permanentemente estes itens duplicados?", @@ -824,7 +824,7 @@ "delete_library": "Eliminar Biblioteca", "delete_link": "Eliminar link", "delete_local_action_prompt": "{count} eliminados localmente", - "delete_local_dialog_ok_backed_up_only": "Excluir apenas arquivos com backup", + "delete_local_dialog_ok_backed_up_only": "Eliminar apenas ficheiros com cÃŗpia de segurança", "delete_local_dialog_ok_force": "Excluir mesmo assim", "delete_others": "Excluir outros", "delete_permanently": "Eliminar permanentemente", @@ -872,7 +872,7 @@ "download_settings_description": "Gerir definiçÃĩes relacionadas com a transferÃĒncia de ficheiros", "download_started": "Iniciando", "download_sucess": "Baixado com sucesso", - "download_sucess_android": "O arquivo foi baixado na pasta DCIM/Immich", + "download_sucess_android": "O ficheiro foi descarregado para a pasta DCIM/Immich", "download_waiting_to_retry": "Tentando novamente", "downloading": "A transferir", "downloading_asset_filename": "A transferir o ficheiro {filename}", @@ -1134,7 +1134,7 @@ "group_owner": "Agrupar por dono", "group_places_by": "Agrupar lugares por...", "group_year": "Agrupar por ano", - "haptic_feedback_switch": "Habilitar vibraÃ§ÃŖo", + "haptic_feedback_switch": "Ativar vibraÃ§ÃŖo", "haptic_feedback_title": "VibraÃ§ÃŖo", "has_quota": "Tem quota", "hash_asset": "Criptografar ficheiro", @@ -1154,20 +1154,20 @@ "hide_unnamed_people": "Ocultar pessoas sem nome", "home_page_add_to_album_conflicts": "Foram adicionados {added} ficheiros ao ÃĄlbum {album}. {failed} ficheiros jÃĄ estÃŖo no ÃĄlbum.", "home_page_add_to_album_err_local": "Ainda nÃŖo Ê possível adicionar recursos locais aos ÃĄlbuns, ignorando", - "home_page_add_to_album_success": "Adicionado {added} arquivos ao ÃĄlbum {album}.", - "home_page_album_err_partner": "Ainda nÃŖo Ê possível adicionar arquivos do parceiro a um ÃĄlbum, ignorando", + "home_page_add_to_album_success": "{added} ficheiros foram adicionados ao ÃĄlbum {album}.", + "home_page_album_err_partner": "Ainda nÃŖo Ê possível adicionar ficheiros do parceiro a um ÃĄlbum, a ignorar", "home_page_archive_err_local": "Ainda nÃŖo Ê possível arquivar recursos locais, ignorando", "home_page_archive_err_partner": "NÃŖo Ê possível arquivar Fotos e Videos do parceiro, ignorando", "home_page_building_timeline": "Construindo a linha do tempo", - "home_page_delete_err_partner": "NÃŖo Ê possível excluir arquivos do parceiro, ignorando", - "home_page_delete_remote_err_local": "Foram selecionados arquivos locais para excluir remotamente, ignorando", + "home_page_delete_err_partner": "NÃŖo Ê possível eliminar ficheiros do parceiro, a ignorar", + "home_page_delete_remote_err_local": "Foram selecionados ficheiros locais para excluir remotamente, a ignorar", "home_page_favorite_err_local": "Ainda nÃŖo Ê possível adicionar recursos locais favoritos, ignorando", - "home_page_favorite_err_partner": "Ainda nÃŖo Ê possível marcar arquivos do parceiro como favoritos, ignorando", + "home_page_favorite_err_partner": "Ainda nÃŖo Ê possível marcar ficheiros do parceiro como favoritos, a ignorar", "home_page_first_time_notice": "Se Ê a primeira vez que utiliza a aplicaÃ§ÃŖo, certifique-se de que marca pelo menos um ÃĄlbum do dispositivo para cÃŗpia de segurança, para a linha do tempo poder ser preenchida com fotos e vídeos", "home_page_locked_error_local": "NÃŖo foi possível mover ficheiros locais para a pasta trancada, a continuar", "home_page_locked_error_partner": "NÃŖo foi possível mover ficheiros do parceiro para a pasta trancada, a continuar", - "home_page_share_err_local": "NÃŖo Ê possível compartilhar arquivos locais com um link, ignorando", - "home_page_upload_err_limit": "SÃŗ Ê possível enviar 30 arquivos por vez, ignorando", + "home_page_share_err_local": "NÃŖo Ê possível partilhar ficheiros locais com um link, a ignorar", + "home_page_upload_err_limit": "SÃŗ Ê possível enviar um mÃĄximo de 30 ficheiros de cada vez, a ignorar", "host": "Servidor", "hour": "Hora", "hours": "Horas", @@ -1187,7 +1187,7 @@ "image_alt_text_date_place_3_people": "{isVideo, select, true {Vídeo gravado} other {Foto tirada}} em {city}, {country} com {person1}, {person2}, e {person3} em {date}", "image_alt_text_date_place_4_or_more_people": "{isVideo, select, true {Vídeo gravado} other {Foto tirada}} em {city}, {country} com {person1}, {person2}, e outras {additionalCount, number} pessoas em {date}", "image_saved_successfully": "Imagem salva", - "image_viewer_page_state_provider_download_started": "Baixando arquivo", + "image_viewer_page_state_provider_download_started": "A descarregar ficheiro", "image_viewer_page_state_provider_download_success": "Baixado com sucesso", "image_viewer_page_state_provider_share_error": "Erro ao compartilhar", "immich_logo": "Logotipo do Immich", @@ -1244,7 +1244,7 @@ "library_options": "OpçÃĩes da biblioteca", "library_page_device_albums": "Álbuns no dispositivo", "library_page_new_album": "Novo ÃĄlbum", - "library_page_sort_asset_count": "Quantidade de arquivos", + "library_page_sort_asset_count": "Quantidade de ficheiros", "library_page_sort_created": "Data de criaÃ§ÃŖo", "library_page_sort_last_modified": "Última modificaÃ§ÃŖo", "library_page_sort_title": "Título do ÃĄlbum", @@ -1383,8 +1383,8 @@ "moved_to_archive": "{count, plural, one {Foi movido # ficheiro} other {Foram movidos # ficheiros}} para o arquivo", "moved_to_library": "{count, plural, one {Foi movido # ficheiro} other {Foram movidos # ficheiros}} para a biblioteca", "moved_to_trash": "Enviado para a reciclagem", - "multiselect_grid_edit_date_time_err_read_only": "NÃŖo Ê possível editar a data de arquivo sÃŗ leitura, ignorando", - "multiselect_grid_edit_gps_err_read_only": "NÃŖo Ê possível editar a localizaÃ§ÃŖo de arquivo sÃŗ leitura, ignorando", + "multiselect_grid_edit_date_time_err_read_only": "NÃŖo Ê possível editar a data de um ficheiro sÃŗ de leitura, a ignorar", + "multiselect_grid_edit_gps_err_read_only": "NÃŖo Ê possível editar a localizaÃ§ÃŖo de um ficheiro sÃŗ de leitura, a ignorar", "mute_memories": "Silenciar MemÃŗrias", "my_albums": "Os meus ÃĄlbuns", "name": "Nome", @@ -1417,7 +1417,7 @@ "no_albums_yet": "Parece que ainda nÃŖo tem nenhum ÃĄlbum.", "no_archived_assets_message": "Arquive fotos e vídeos para os ocultar da sua visualizaÃ§ÃŖo de fotos", "no_assets_message": "FAÇA CLIQUE PARA CARREGAR A SUA PRIMEIRA FOTO", - "no_assets_to_show": "NÃŖo hÃĄ arquivos para exibir", + "no_assets_to_show": "NÃŖo hÃĄ ficheiros para exibir", "no_cast_devices_found": "Nenhum dispositivo de transmissÃŖo encontrado", "no_checksum_local": "Sem cÃĄlculo de verificaÃ§ÃŖo disponível - nÃŖo pode capturar conteÃēdos locais", "no_checksum_remote": "Soma de verificaÃ§ÃŖo (checksum) nÃŖo disponível - nÃŖo Ê possível obter o recurso remoto", @@ -1586,7 +1586,7 @@ "public_album": "Álbum pÃēblico", "public_share": "Partilhar Publicamente", "purchase_account_info": "Apoiante", - "purchase_activated_subtitle": "Agradecemos por apoiar o Immich e software de cÃŗdigo aberto", + "purchase_activated_subtitle": "Agradecemos o seu apoio ao Immich e ao software de cÃŗdigo aberto", "purchase_activated_time": "Ativado em {date}", "purchase_activated_title": "A sua chave foi ativada com sucesso", "purchase_button_activate": "Ativar", @@ -1747,7 +1747,7 @@ "search_filter_date_title": "Selecione a data", "search_filter_display_option_not_in_album": "Fora de ÃĄlbum", "search_filter_display_options": "OpçÃĩes de exibiÃ§ÃŖo", - "search_filter_filename": "Pesquisar por nome do arquivo", + "search_filter_filename": "Pesquisar por nome do ficheiro", "search_filter_location": "LocalizaÃ§ÃŖo", "search_filter_location_title": "Selecione a localizaÃ§ÃŖo", "search_filter_media_type": "Tipo da mídia", @@ -1839,15 +1839,15 @@ "setting_notifications_notify_minutes": "{count} minutos", "setting_notifications_notify_never": "Nunca", "setting_notifications_notify_seconds": "{count} segundos", - "setting_notifications_single_progress_subtitle": "InformaçÃĩes detalhadas sobre o progresso do envio por arquivo", + "setting_notifications_single_progress_subtitle": "InformaçÃĩes detalhadas sobre o progresso do envio por ficheiro", "setting_notifications_single_progress_title": "Mostrar progresso detalhado do backup em segundo plano", "setting_notifications_subtitle": "Ajuste as preferÃĒncias de notificaÃ§ÃŖo", - "setting_notifications_total_progress_subtitle": "Progresso do envio de arquivos (concluídos/total)", + "setting_notifications_total_progress_subtitle": "Progresso do envio de ficheiro (concluídos/total)", "setting_notifications_total_progress_title": "Mostrar progresso total do backup em segundo plano", "setting_video_viewer_auto_play_subtitle": "Reproduzir os vídeos automaticamente quando abertos", "setting_video_viewer_auto_play_title": "Reproduzir vídeos automaticamente", "setting_video_viewer_looping_title": "Repetir", - "setting_video_viewer_original_video_subtitle": "Ao transmitir um vídeo do servidor, usar o arquivo original, mesmo quando uma versÃŖo transcodificada esteja disponível. Pode fazer com que o vídeo demore para carregar. Vídeos disponíveis localmente sÃŖo exibidos na qualidade original independente desta configuraÃ§ÃŖo.", + "setting_video_viewer_original_video_subtitle": "Ao transmitir um vídeo do servidor, usar o ficheiro original, mesmo se uma versÃŖo transcodificada estiver disponível. Pode causar interrupçÃĩes. Vídeos disponíveis localmente sÃŖo exibidos na qualidade original independentemente desta definiÃ§ÃŖo.", "setting_video_viewer_original_video_title": "Forçar vídeo original", "settings": "DefiniçÃĩes", "settings_require_restart": "Reinicie o Immich para aplicar essa configuraÃ§ÃŖo", @@ -2019,7 +2019,7 @@ "theme_setting_primary_color_subtitle": "Selecione a cor primÃĄria, utilizada nas açÃĩes principais e nos realces.", "theme_setting_primary_color_title": "Cor primÃĄria", "theme_setting_system_primary_color_title": "Use a cor do sistema", - "theme_setting_system_theme_switch": "AutomÃĄtico (Siga a configuraÃ§ÃŖo do sistema)", + "theme_setting_system_theme_switch": "AutomÃĄtico (Seguir a configuraÃ§ÃŖo do sistema)", "theme_setting_theme_subtitle": "Escolha a configuraÃ§ÃŖo do tema da aplicaÃ§ÃŖo", "theme_setting_three_stage_loading_subtitle": "O carregamento em trÃĒs estÃĄgios pode aumentar o desempenho do carregamento, mas causa uma carga de rede significativamente maior", "theme_setting_three_stage_loading_title": "Habilitar carregamento em trÃĒs estÃĄgios", @@ -2048,11 +2048,11 @@ "trash_emptied": "Lixeira esvaziada", "trash_no_results_message": "Fotos e vídeos enviados para a reciclagem aparecem aqui.", "trash_page_delete_all": "Excluir tudo", - "trash_page_empty_trash_dialog_content": "Deseja esvaziar a lixera? Estes arquivos serÃŖo apagados de forma permanente do Immich", + "trash_page_empty_trash_dialog_content": "Deseja esvaziar a reciclagem? Estes ficheiros serÃŖo apagados permanentemente do Immich", "trash_page_info": "Ficheiros na reciclagem irÃŖo ser eliminados permanentemente apÃŗs {days} dias", "trash_page_no_assets": "Lixeira vazia", "trash_page_restore_all": "Restaurar tudo", - "trash_page_select_assets_btn": "Selecionar arquivos", + "trash_page_select_assets_btn": "Selecionar ficheiros", "trash_page_title": "Reciclagem ({count})", "trashed_items_will_be_permanently_deleted_after": "Os itens da reciclagem sÃŖo eliminados permanentemente apÃŗs {days, plural, one {# dia} other {# dias}}.", "troubleshoot": "Diagnosticar problemas", @@ -2094,8 +2094,8 @@ "upload_action_prompt": "{count} à espera de carregar", "upload_concurrency": "Carregamentos em simultÃĸneo", "upload_details": "Detalhes do Carregamento", - "upload_dialog_info": "Deseja fazer o backup dos arquivos selecionados no servidor?", - "upload_dialog_title": "Enviar arquivo", + "upload_dialog_info": "Deseja realizar uma cÃŗpia de segurança dos ficheiros selecionados para o servidor?", + "upload_dialog_title": "Enviar ficheiro", "upload_errors": "Envio completo com {count, plural, one {# erro} other {# erros}}, atualize a pÃĄgina para ver os novos ficheiros enviados.", "upload_finished": "Carregamento acabado", "upload_progress": "Restante(s) {remaining, number} - Processado(s) {processed, number}/{total, number}", diff --git a/i18n/ru.json b/i18n/ru.json index d7c50be699..52cd3adbc3 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -485,7 +485,7 @@ "app_bar_signout_dialog_content": "Đ’Ņ‹ ŅƒĐ˛ĐĩŅ€ĐĩĐŊŅ‹, Ņ‡Ņ‚Đž Ņ…ĐžŅ‚Đ¸Ņ‚Đĩ Đ˛Ņ‹ĐšŅ‚Đ¸?", "app_bar_signout_dialog_ok": "Да", "app_bar_signout_dialog_title": "Đ’Ņ‹ĐšŅ‚Đ¸", - "app_download_links": "Đ—Đ°ĐŗŅ€ŅƒĐˇĐēа ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊĐ¸Ņ", + "app_download_links": "ĐĄŅŅ‹ĐģĐēи ĐŊа ĐˇĐ°ĐŗŅ€ŅƒĐˇĐē҃ ĐŧОйиĐģҌĐŊĐžĐŗĐž ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊĐ¸Ņ", "app_settings": "ĐŸĐ°Ņ€Đ°ĐŧĐĩ҂Ҁҋ ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊĐ¸Ņ", "app_stores": "ĐœĐ°ĐŗĐ°ĐˇĐ¸ĐŊŅ‹ ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊиК", "app_update_available": "Đ”ĐžŅŅ‚ŅƒĐŋĐŊа ĐŊĐžĐ˛Đ°Ņ вĐĩŅ€ŅĐ¸Ņ ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊĐ¸Ņ", @@ -1346,7 +1346,7 @@ "map_zoom_to_see_photos": "ĐŖĐŧĐĩĐŊҌ҈ĐĩĐŊиĐĩ ĐŧĐ°ŅŅˆŅ‚Đ°ĐąĐ° Đ´ĐģŅ ĐŋŅ€ĐžŅĐŧĐžŅ‚Ņ€Đ° Ņ„ĐžŅ‚ĐžĐŗŅ€Đ°Ņ„Đ¸Đš", "mark_all_as_read": "ĐŸŅ€ĐžŅ‡Đ¸Ņ‚Đ°ĐŊĐž", "mark_as_read": "ĐžŅ‚ĐŧĐĩŅ‚Đ¸Ņ‚ŅŒ ĐēаĐē ĐŋŅ€ĐžŅ‡Đ¸Ņ‚Đ°ĐŊĐŊĐžĐĩ", - "marked_all_as_read": "ĐžŅ‚ĐŧĐĩ҇ĐĩĐŊŅ‹ ĐēаĐē ĐŋŅ€ĐžŅ‡Đ¸Ņ‚Đ°ĐŊĐŊŅ‹Đĩ", + "marked_all_as_read": "Đ’ŅĐĩ ŅƒĐ˛ĐĩĐ´ĐžĐŧĐģĐĩĐŊĐ¸Ņ ĐžŅ‚ĐŧĐĩ҇ĐĩĐŊŅ‹ ĐēаĐē ĐŋŅ€ĐžŅ‡Đ¸Ņ‚Đ°ĐŊĐŊŅ‹Đĩ", "matches": "ХОвĐŋадĐĩĐŊĐ¸Ņ", "matching_assets": "ĐĄĐžĐžŅ‚Đ˛ĐĩŅ‚ŅŅ‚Đ˛ŅƒŅŽŅ‰Đ¸Đĩ ĐžĐąŅŠĐĩĐē҂ҋ", "media_type": "ĐĸиĐŋ ĐŧĐĩдиа", @@ -1453,7 +1453,7 @@ "oauth": "OAuth", "obtainium_configurator": "ĐĐ°ŅŅ‚Ņ€ĐžĐšĐēа Obtainium", "obtainium_configurator_instructions": "ДĐģŅ ŅƒŅŅ‚Đ°ĐŊОвĐēи и ОйĐŊОвĐģĐĩĐŊĐ¸Ņ Android ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊĐ¸Ņ Immich ĐŊаĐŋŅ€ŅĐŧŅƒŅŽ иС Đ¸ŅŅ‚ĐžŅ‡ĐŊиĐēОв ĐŊа GitHub (ĐŧиĐŊŅƒŅ ĐŧĐ°ĐŗĐ°ĐˇĐ¸ĐŊŅ‹ ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊиК) ĐŧĐžĐļĐŊĐž Đ¸ŅĐŋĐžĐģŅŒĐˇĐžĐ˛Đ°Ņ‚ŅŒ Obtainium. ĐĄĐžĐˇĐ´Đ°ĐšŅ‚Đĩ ĐŊĐžĐ˛Ņ‹Đš API ĐēĐģŅŽŅ‡ и ҃ĐēаĐļĐ¸Ņ‚Đĩ Đ°Ņ€Ņ…Đ¸Ņ‚ĐĩĐēŅ‚ŅƒŅ€Ņƒ ĐŋŅ€Đ¸ĐģĐžĐļĐĩĐŊĐ¸Ņ Đ´ĐģŅ Ņ„ĐžŅ€ĐŧĐ¸Ņ€ĐžĐ˛Đ°ĐŊĐ¸Ņ ҁҁҋĐģĐēи Đ´ĐģŅ Obtainium.", - "ocr": "Đ Đ°ŅĐŋОСĐŊаваĐŊиĐĩ Ņ‚ĐĩĐēŅŅ‚Đ°", + "ocr": "OCR", "official_immich_resources": "ĐžŅ„Đ¸Ņ†Đ¸Đ°ĐģҌĐŊŅ‹Đĩ Ņ€ĐĩŅŅƒŅ€ŅŅ‹ Immich", "offline": "НĐĩĐ´ĐžŅŅ‚ŅƒĐŋĐĩĐŊ", "offset": "ĐĄĐŧĐĩ҉ĐĩĐŊиĐĩ", @@ -1858,7 +1858,7 @@ "share_add_photos": "Đ”ĐžĐąĐ°Đ˛Đ¸Ņ‚ŅŒ Ņ„ĐžŅ‚Đž", "share_assets_selected": "{count} Đ˛Ņ‹ĐąŅ€Đ°ĐŊĐž", "share_dialog_preparing": "ĐŸĐžĐ´ĐŗĐžŅ‚ĐžĐ˛Đēа...", - "share_link": "ПодĐĩĐģĐ¸Ņ‚ŅŒŅŅ ҁҁҋĐģĐēОК", + "share_link": "ĐĄĐžĐˇĐ´Đ°Ņ‚ŅŒ ҁҁҋĐģĐē҃", "shared": "ĐžĐąŅ‰Đ¸e", "shared_album_activities_input_disable": "КоĐŧĐŧĐĩĐŊŅ‚Đ°Ņ€Đ¸Đ¸ ĐžŅ‚ĐēĐģŅŽŅ‡ĐĩĐŊŅ‹", "shared_album_activity_remove_content": "ĐŖĐ´Đ°ĐģĐ¸Ņ‚ŅŒ ŅĐžĐžĐąŅ‰ĐĩĐŊиĐĩ?", diff --git a/i18n/sv.json b/i18n/sv.json index db7854a38a..d8f45465af 100644 --- a/i18n/sv.json +++ b/i18n/sv.json @@ -418,7 +418,7 @@ "advanced_settings_prefer_remote_title": "FÃļredra bilder frÃĨn servern", "advanced_settings_proxy_headers_subtitle": "Definiera proxy-headers som Immich ska skicka med i varje närverksanrop", "advanced_settings_proxy_headers_title": "Anpassade proxyheaders [EXPERIMENTELLT]", - "advanced_settings_readonly_mode_subtitle": "Aktiverar skrivskyddat läge där foton endast kan visas. FÃļljande funktioner inaktiveras: välj flera bilder, dela, casta, ta bort bilder. Aktivera/inaktivera skrivskyddat läge via profilbilden pÃĨ appens hemskärm", + "advanced_settings_readonly_mode_subtitle": "Aktiverar skrivskyddat-läge där foton endast kan visas. FÃļljande funktioner inaktiveras: välj flera bilder, dela, casta, ta bort bilder. Aktivera/inaktivera skrivskyddat läge via profilbilden pÃĨ appens hemskärm", "advanced_settings_readonly_mode_title": "Skrivskyddat läge", "advanced_settings_self_signed_ssl_subtitle": "Hoppar Ãļver verifiering av serverns SSL-certifikat. Krävs fÃļr självsignerade certifikat.", "advanced_settings_self_signed_ssl_title": "TillÃĨt självsignerade SSL-certifikat [EXPERIMENTELLT]", @@ -791,6 +791,7 @@ "daily_title_text_date_year": "E, dd MMM, yyyy", "dark": "MÃļrk", "dark_theme": "Växla mÃļrkt tema", + "date": "Datum", "date_after": "Datum efter", "date_and_time": "Datum och Tid", "date_before": "Datum fÃļre", @@ -1099,6 +1100,7 @@ "features_setting_description": "Hantera appens funktioner", "file_name": "Filnamn", "file_name_or_extension": "Filnamn eller -tillägg", + "file_size": "Filstorlek", "filename": "Filnamn", "filetype": "Filtyp", "filter": "Filter", @@ -1262,6 +1264,7 @@ "local_media_summary": "Sammanfattning av lokala medier", "local_network": "Lokalt nätverk", "local_network_sheet_info": "Appen kommer ansluta till servern via denna URL när det specificerade WiFi-nätverket används", + "location": "Position", "location_permission": "Plats-rättighet", "location_permission_content": "FÃļr att använda funktionen fÃļr automatisk växling behÃļver Immich behÃļrighet till exakt plats sÃĨ att appen kan läsa av det aktuella Wi-Fi-nätverkets namn", "location_picker_choose_on_map": "Välj pÃĨ karta", @@ -1694,6 +1697,7 @@ "reset_sqlite_confirmation": "Är du säker pÃĨ att du vill ÃĨterställa SQLite-databasen? Du mÃĨste logga ut och logga in igen fÃļr att synkronisera om data", "reset_sqlite_success": "Återställde SQLite-databasen", "reset_to_default": "Återställ till standard", + "resolution": "UpplÃļsning", "resolve_duplicates": "LÃļs dubletter", "resolved_all_duplicates": "LÃļs alla dubletter", "restore": "Återställ", @@ -1712,6 +1716,7 @@ "running": "IgÃĨngsatt", "save": "Spara", "save_to_gallery": "Spara i galleri", + "saved": "Sparad", "saved_api_key": "Sparad API-nyckel", "saved_profile": "Sparade profil", "saved_settings": "Sparade inställningar", @@ -2020,6 +2025,7 @@ "theme_setting_three_stage_loading_title": "Aktivera trestegsladdning", "they_will_be_merged_together": "De kommer att slÃĨs samman", "third_party_resources": "Tredjepartsresurser", + "time": "Tid", "time_based_memories": "Tidsbaserade minnen", "timeline": "Tidslinje", "timezone": "Tidszon", diff --git a/i18n/ta.json b/i18n/ta.json index cca12c4d76..90a7f8e214 100644 --- a/i18n/ta.json +++ b/i18n/ta.json @@ -154,6 +154,18 @@ "machine_learning_min_detection_score_description": "āŽ’āŽ°ā¯ āŽŽā¯āŽ•āŽŽā¯ 0-1 āŽŽā¯āŽ¤āŽ˛ā¯ āŽ•āŽŖā¯āŽŸāŽąāŽŋāŽ¯āŽĒā¯āŽĒāŽŸā¯āŽĩāŽ¤āŽąā¯āŽ•ā¯ āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽ¨āŽŽā¯āŽĒāŽŋāŽ•ā¯āŽ•ā¯ˆ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯. āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯āŽ•āŽŗā¯ āŽ…āŽ¤āŽŋāŽ• āŽŽā¯āŽ•āŽ™ā¯āŽ•āŽŗā¯ˆāŽ•ā¯ āŽ•āŽŖā¯āŽŸāŽąāŽŋāŽ¯ā¯āŽŽā¯, āŽ†āŽŠāŽžāŽ˛ā¯ āŽ¤āŽĩāŽąāŽžāŽŠ āŽ¨ā¯‡āŽ°ā¯āŽŽāŽąā¯ˆāŽ•āŽŗā¯ˆ āŽāŽąā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽ•ā¯āŽ•ā¯‚āŽŸā¯āŽŽā¯.", "machine_learning_min_recognized_faces": "āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽ…āŽ™ā¯āŽ•ā¯€āŽ•āŽ°āŽŋāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽŸ āŽŽā¯āŽ•āŽ™ā¯āŽ•āŽŗā¯", "machine_learning_min_recognized_faces_description": "āŽ’āŽ°ā¯ āŽ¨āŽĒāŽ°ā¯āŽ•ā¯āŽ•ā¯ āŽ‰āŽ°ā¯āŽĩāŽžāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸ āŽĩā¯‡āŽŖā¯āŽŸāŽŋāŽ¯ āŽ…āŽ™ā¯āŽ•ā¯€āŽ•āŽ°āŽŋāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽŸ āŽŽā¯āŽ•āŽ™ā¯āŽ•āŽŗāŽŋāŽŠā¯ āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽŽāŽŖā¯āŽŖāŽŋāŽ•ā¯āŽ•ā¯ˆ. āŽ‡āŽ¤ā¯ˆ āŽ…āŽ¤āŽŋāŽ•āŽ°āŽŋāŽĒā¯āŽĒāŽ¤ā¯, āŽ’āŽ°ā¯ āŽ¨āŽĒāŽ°ā¯āŽ•ā¯āŽ•ā¯ āŽŽā¯āŽ•āŽŽā¯ āŽ’āŽ¤ā¯āŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸāŽžāŽŽāŽ˛ā¯ āŽĒā¯‹āŽ•ā¯āŽŽā¯ āŽĩāŽžāŽ¯ā¯āŽĒā¯āŽĒ❈ āŽ…āŽ¤āŽŋāŽ•āŽ°āŽŋāŽ•ā¯āŽ•ā¯āŽŽā¯ āŽšā¯†āŽ˛āŽĩāŽŋāŽ˛ā¯, āŽŽā¯āŽ• āŽ…āŽ™ā¯āŽ•ā¯€āŽ•āŽžāŽ°āŽ¤ā¯āŽ¤ā¯ˆ āŽŽāŽŋāŽ•āŽĩā¯āŽŽā¯ āŽ¤ā¯āŽ˛ā¯āŽ˛āŽŋāŽ¯āŽŽāŽžāŽ•ā¯āŽ•ā¯āŽ•āŽŋāŽąāŽ¤ā¯.", + "machine_learning_ocr": "āŽ“āŽšāŽŋāŽ†āŽ°ā¯", + "machine_learning_ocr_description": "āŽĒāŽŸāŽ™ā¯āŽ•āŽŗāŽŋāŽ˛ā¯ āŽ‰āŽŗā¯āŽŗ āŽ‰āŽ°ā¯ˆāŽ¯ā¯ˆ āŽ…āŽŸā¯ˆāŽ¯āŽžāŽŗāŽŽā¯ āŽ•āŽžāŽŖ āŽ‡āŽ¯āŽ¨ā¯āŽ¤āŽŋāŽ° āŽ•āŽąā¯āŽąāŽ˛ā¯ˆāŽĒā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽĩā¯āŽŽā¯", + "machine_learning_ocr_enabled": "āŽ“āŽšāŽŋāŽ†āŽ°ā¯ āŽ āŽ‡āŽ¯āŽ˛āŽšā¯āŽšā¯†āŽ¯ā¯", + "machine_learning_ocr_enabled_description": "āŽŽā¯āŽŸāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽŸāŽžāŽ˛ā¯, āŽĒāŽŸāŽ™ā¯āŽ•āŽŗā¯ āŽ‰āŽ°ā¯ˆ āŽ…āŽŸā¯ˆāŽ¯āŽžāŽŗāŽŽā¯ āŽ•āŽžāŽŖāŽĒā¯āŽĒāŽŸāŽžāŽ¤ā¯.", + "machine_learning_ocr_max_resolution": "āŽ…āŽ¤āŽŋāŽ•āŽĒāŽŸā¯āŽš āŽ¤ā¯†āŽŗāŽŋāŽĩā¯āŽ¤ā¯āŽ¤āŽŋāŽąāŽŠā¯", + "machine_learning_ocr_max_resolution_description": "āŽ‡āŽ¨ā¯āŽ¤āŽ¤ā¯ āŽ¤ā¯†āŽŗāŽŋāŽĩā¯āŽ¤ā¯āŽ¤āŽŋāŽąāŽŠā¯āŽ•ā¯āŽ•ā¯ āŽŽā¯‡āŽ˛ā¯‡ āŽ‰āŽŗā¯āŽŗ āŽŽāŽžāŽ¤āŽŋāŽ°āŽŋāŽ•ā¯āŽ•āŽžāŽŸā¯āŽšāŽŋāŽ•āŽŗā¯, āŽ¤ā¯‹āŽąā¯āŽą āŽĩāŽŋāŽ•āŽŋāŽ¤āŽ¤ā¯āŽ¤ā¯ˆāŽĒā¯ āŽĒāŽžāŽ¤ā¯āŽ•āŽžāŽ•ā¯āŽ•ā¯āŽŽā¯ āŽ…āŽ¤ā¯‡ āŽĩā¯‡āŽŗā¯ˆāŽ¯āŽŋāŽ˛ā¯, āŽ…āŽŗāŽĩ❁ āŽŽāŽžāŽąā¯āŽąāŽĒā¯āŽĒāŽŸā¯āŽŽā¯. āŽ…āŽ¤āŽŋāŽ• āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯āŽ•āŽŗā¯ āŽŽāŽŋāŽ•āŽĩā¯āŽŽā¯ āŽ¤ā¯āŽ˛ā¯āŽ˛āŽŋāŽ¯āŽŽāŽžāŽŠāŽĩ❈, āŽ†āŽŠāŽžāŽ˛ā¯ āŽšā¯†āŽ¯āŽ˛āŽžāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯ āŽ…āŽ¤āŽŋāŽ• āŽ¨āŽŋāŽŠā¯ˆāŽĩāŽ•āŽ¤ā¯āŽ¤ā¯ˆāŽĒā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽĩā¯āŽŽā¯ āŽ…āŽ¤āŽŋāŽ• āŽ¨ā¯‡āŽ°āŽŽā¯ āŽŽāŽŸā¯āŽ•ā¯āŽ•ā¯āŽŽā¯.", + "machine_learning_ocr_min_detection_score": "āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽ•āŽŖā¯āŽŸāŽąāŽŋāŽ¤āŽ˛ā¯ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯", + "machine_learning_ocr_min_detection_score_description": "āŽ‰āŽ°ā¯ˆāŽ¯ā¯ˆāŽ•ā¯ āŽ•āŽŖā¯āŽŸāŽąāŽŋāŽ¯ āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽ¨āŽŽā¯āŽĒāŽŋāŽ•ā¯āŽ•ā¯ˆ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯ 0-1. āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯ āŽ…āŽ¤āŽŋāŽ• āŽ‰āŽ°ā¯ˆāŽ¯ā¯ˆāŽ•ā¯ āŽ•āŽŖā¯āŽŸāŽąāŽŋāŽ¯ā¯āŽŽā¯, āŽ†āŽŠāŽžāŽ˛ā¯ āŽ¤āŽĩāŽąāŽžāŽŠ āŽ¤āŽ•āŽĩāŽ˛ā¯āŽ•ā¯āŽ•ā¯ āŽĩāŽ´āŽŋāŽĩāŽ•ā¯āŽ•ā¯āŽ•ā¯āŽŽā¯.", + "machine_learning_ocr_min_recognition_score": "āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽ…āŽ™ā¯āŽ•ā¯€āŽ•āŽžāŽ° āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯", + "machine_learning_ocr_min_score_recognition_description": "āŽ•āŽŖā¯āŽŸāŽąāŽŋāŽ¯āŽĒā¯āŽĒāŽŸā¯āŽŸ āŽ‰āŽ°ā¯ˆāŽ¯ā¯ˆ āŽ…āŽ™ā¯āŽ•ā¯€āŽ•āŽ°āŽŋāŽ•ā¯āŽ• āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤āŽĒāŽŸā¯āŽš āŽ¨āŽŽā¯āŽĒāŽŋāŽ•ā¯āŽ•ā¯ˆ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯ 0-1 āŽ†āŽ•ā¯āŽŽā¯. āŽ•ā¯āŽąā¯ˆāŽ¨ā¯āŽ¤ āŽŽāŽ¤āŽŋāŽĒā¯āŽĒā¯†āŽŖā¯ āŽ…āŽ¤āŽŋāŽ• āŽ‰āŽ°ā¯ˆāŽ¯ā¯ˆ āŽ…āŽ™ā¯āŽ•ā¯€āŽ•āŽ°āŽŋāŽ•ā¯āŽ•ā¯āŽŽā¯, āŽ†āŽŠāŽžāŽ˛ā¯ āŽ¤āŽĩāŽąāŽžāŽŠ āŽ¨ā¯‡āŽ°ā¯āŽŽāŽąā¯ˆāŽ•āŽŗā¯āŽ•ā¯āŽ•ā¯ āŽĩāŽ´āŽŋāŽĩāŽ•ā¯āŽ•ā¯āŽ•ā¯āŽŽā¯.", + "machine_learning_ocr_model": "āŽ“āŽšāŽŋāŽ†āŽ°ā¯ āŽŽāŽžāŽ¤āŽŋāŽ°āŽŋ", + "machine_learning_ocr_model_description": "āŽŽā¯ŠāŽĒā¯ˆāŽ˛ā¯ āŽŽāŽžāŽŸāŽ˛ā¯āŽ•āŽŗā¯ˆ āŽĩāŽŋāŽŸ āŽšāŽ°ā¯āŽĩāŽ°ā¯ āŽŽāŽžāŽŸāŽ˛ā¯āŽ•āŽŗā¯ āŽŽāŽŋāŽ•āŽĩā¯āŽŽā¯ āŽ¤ā¯āŽ˛ā¯āŽ˛āŽŋāŽ¯āŽŽāŽžāŽŠāŽĩ❈, āŽ†āŽŠāŽžāŽ˛ā¯ āŽ…āŽ¤āŽŋāŽ• āŽ¨āŽŋāŽŠā¯ˆāŽĩāŽ•āŽ¤ā¯āŽ¤ā¯ˆ āŽšā¯†āŽ¯āŽ˛āŽžāŽ•ā¯āŽ•āŽŋ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤ āŽ…āŽ¤āŽŋāŽ• āŽ¨ā¯‡āŽ°āŽŽā¯ āŽŽāŽŸā¯āŽ•ā¯āŽ•ā¯āŽŽā¯.", "machine_learning_settings": "āŽ‡āŽ¯āŽ¨ā¯āŽ¤āŽŋāŽ° āŽ•āŽąā¯āŽąāŽ˛ā¯ āŽ…āŽŽā¯ˆāŽĒā¯āŽĒā¯āŽ•āŽŗā¯", "machine_learning_settings_description": "āŽ‡āŽ¯āŽ¨ā¯āŽ¤āŽŋāŽ° āŽ•āŽąā¯āŽąāŽ˛ā¯ āŽ…āŽŽā¯āŽšāŽ™ā¯āŽ•āŽŗā¯ āŽŽāŽąā¯āŽąā¯āŽŽā¯ āŽ…āŽŽā¯ˆāŽĒā¯āŽĒā¯āŽ•āŽŗā¯ˆ āŽ¨āŽŋāŽ°ā¯āŽĩāŽ•āŽŋāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "machine_learning_smart_search": "āŽ¸ā¯āŽŽāŽžāŽ°ā¯āŽŸā¯ āŽ¤ā¯‡āŽŸāŽ˛ā¯", @@ -245,6 +257,7 @@ "oauth_storage_quota_default_description": "GiB āŽ‡āŽ˛ā¯ āŽ‰āŽŗā¯āŽŗ āŽ’āŽ¤ā¯āŽ•ā¯āŽ•ā¯€āŽŸā¯ āŽŽāŽ¨ā¯āŽ¤ āŽ‰āŽ°āŽŋāŽŽā¯ˆāŽ•ā¯‹āŽ°āŽ˛ā¯āŽŽā¯ āŽĩāŽ´āŽ™ā¯āŽ•āŽĒā¯āŽĒāŽŸāŽžāŽ¤āŽĒā¯‹āŽ¤ā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽĒā¯āŽĒāŽŸā¯āŽŽā¯ .", "oauth_timeout": "āŽ•ā¯‹āŽ°āŽŋāŽ•ā¯āŽ•ā¯ˆ āŽ¨ā¯‡āŽ°āŽŽā¯ āŽŽā¯āŽŸāŽŋāŽ¨ā¯āŽ¤āŽ¤ā¯", "oauth_timeout_description": "āŽ•ā¯‹āŽ°āŽŋāŽ•ā¯āŽ•ā¯ˆāŽ•āŽŗā¯āŽ•ā¯āŽ•āŽžāŽŠ āŽ•āŽžāŽ˛āŽ•ā¯āŽ•ā¯†āŽŸā¯ āŽŽāŽŋāŽ˛ā¯āŽ˛āŽŋ āŽĩāŽŋāŽŠāŽžāŽŸāŽŋāŽ•āŽŗāŽŋāŽ˛ā¯", + "ocr_job_description": "āŽĒāŽŸāŽ™ā¯āŽ•āŽŗāŽŋāŽ˛ā¯ āŽ‰āŽŗā¯āŽŗ āŽ‰āŽ°ā¯ˆāŽ¯ā¯ˆ āŽ…āŽŸā¯ˆāŽ¯āŽžāŽŗāŽŽā¯ āŽ•āŽžāŽŖ āŽ‡āŽ¯āŽ¨ā¯āŽ¤āŽŋāŽ° āŽ•āŽąā¯āŽąāŽ˛ā¯ˆāŽĒā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽĩā¯āŽŽā¯", "password_enable_description": "āŽŽāŽŋāŽŠā¯āŽŠāŽžā¯āŽšāŽ˛ā¯ āŽŽāŽąā¯āŽąā¯āŽŽā¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯ āŽŽā¯‚āŽ˛āŽŽā¯ āŽ‰āŽŗā¯āŽ¨ā¯āŽ´ā¯ˆāŽ¯āŽĩā¯āŽŽā¯", "password_settings": "āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯ āŽ‰āŽŗā¯āŽ¨ā¯āŽ´ā¯ˆāŽĩ❁", "password_settings_description": "āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯ āŽ‰āŽŗā¯āŽ¨ā¯āŽ´ā¯ˆāŽĩ❁ āŽ…āŽŽā¯ˆāŽĒā¯āŽĒā¯āŽ•āŽŗā¯ˆ āŽ¨āŽŋāŽ°ā¯āŽĩāŽ•āŽŋāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", @@ -669,6 +682,8 @@ "change_password_description": "āŽ¨ā¯€āŽ™ā¯āŽ•āŽŗā¯ āŽ•āŽŖāŽŋāŽŠāŽŋāŽ¯āŽŋāŽ˛ā¯ āŽ•ā¯ˆāŽ¯ā¯ŠāŽĒā¯āŽĒāŽŽāŽŋāŽŸā¯āŽĩāŽ¤ā¯ āŽ‡āŽ¤ā¯āŽĩ❇ āŽŽā¯āŽ¤āŽ˛ā¯ āŽŽā¯āŽąā¯ˆ āŽ…āŽ˛ā¯āŽ˛āŽ¤ā¯ āŽ‰āŽ™ā¯āŽ•āŽŗā¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯āŽ˛ā¯ˆ āŽŽāŽžāŽąā¯āŽąā¯āŽĩāŽ¤āŽąā¯āŽ•āŽžāŽŠ āŽ•ā¯‹āŽ°āŽŋāŽ•ā¯āŽ•ā¯ˆ āŽšā¯†āŽ¯ā¯āŽ¯āŽĒā¯āŽĒāŽŸā¯āŽŸā¯āŽŗā¯āŽŗāŽ¤ā¯. āŽ•ā¯€āŽ´ā¯‡ āŽĒā¯āŽ¤āŽŋāŽ¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯āŽ˛ā¯ˆ āŽ‰āŽŗā¯āŽŗāŽŋāŽŸāŽĩā¯āŽŽā¯.", "change_password_form_confirm_password": "āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯āŽ˛ā¯ˆ āŽ‰āŽąā¯āŽ¤āŽŋāŽĒā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽĩā¯āŽŽā¯", "change_password_form_description": "āŽ†āŽ¯ā¯ {name}, \n\nāŽ¨ā¯€āŽ™ā¯āŽ•āŽŗā¯ āŽ•āŽŖāŽŋāŽŠāŽŋāŽ¯āŽŋāŽ˛ā¯ āŽ•ā¯ˆāŽ¯ā¯ŠāŽĒā¯āŽĒāŽŽāŽŋāŽŸā¯āŽĩāŽ¤ā¯ āŽ‡āŽ¤ā¯āŽĩ❇ āŽŽā¯āŽ¤āŽ˛ā¯ āŽŽā¯āŽąā¯ˆ āŽ…āŽ˛ā¯āŽ˛āŽ¤ā¯ āŽ‰āŽ™ā¯āŽ•āŽŗā¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯āŽ˛ā¯ˆ āŽŽāŽžāŽąā¯āŽąā¯āŽĩāŽ¤āŽąā¯āŽ•āŽžāŽŠ āŽ•ā¯‹āŽ°āŽŋāŽ•ā¯āŽ•ā¯ˆ āŽšā¯†āŽ¯ā¯āŽ¯āŽĒā¯āŽĒāŽŸā¯āŽŸā¯āŽŗā¯āŽŗāŽ¤ā¯. āŽ•ā¯€āŽ´ā¯‡ āŽĒā¯āŽ¤āŽŋāŽ¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯āŽ˛ā¯ˆ āŽ‰āŽŗā¯āŽŗāŽŋāŽŸāŽĩā¯āŽŽā¯.", + "change_password_form_log_out": "āŽŽāŽąā¯āŽą āŽŽāŽ˛ā¯āŽ˛āŽž āŽšāŽžāŽ¤āŽŠāŽ™ā¯āŽ•āŽŗāŽŋāŽ˛āŽŋāŽ°ā¯āŽ¨ā¯āŽ¤ā¯āŽŽā¯ āŽĩā¯†āŽŗāŽŋāŽ¯ā¯‡āŽąā¯", + "change_password_form_log_out_description": "āŽŽāŽąā¯āŽą āŽŽāŽ˛ā¯āŽ˛āŽž āŽšāŽžāŽ¤āŽŠāŽ™ā¯āŽ•āŽŗāŽŋāŽ˛āŽŋāŽ°ā¯āŽ¨ā¯āŽ¤ā¯āŽŽā¯ āŽĩā¯†āŽŗāŽŋāŽ¯ā¯‡āŽą āŽĒāŽ°āŽŋāŽ¨ā¯āŽ¤ā¯āŽ°ā¯ˆāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽ•āŽŋāŽąāŽ¤ā¯", "change_password_form_new_password": "āŽĒā¯āŽ¤āŽŋāŽ¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯", "change_password_form_password_mismatch": "āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽąā¯āŽ•āŽŗā¯ āŽĒā¯ŠāŽ°ā¯āŽ¨ā¯āŽ¤āŽĩāŽŋāŽ˛ā¯āŽ˛ā¯ˆ", "change_password_form_reenter_new_password": "āŽĒā¯āŽ¤āŽŋāŽ¯ āŽ•āŽŸāŽĩā¯āŽšā¯āŽšā¯ŠāŽ˛ā¯āŽ˛ā¯ˆ āŽŽā¯€āŽŖā¯āŽŸā¯āŽŽā¯ āŽ‰āŽŗā¯āŽŗāŽŋāŽŸāŽĩā¯āŽŽā¯", @@ -776,6 +791,7 @@ "daily_title_text_date_year": "E, mmm dd, yyyy", "dark": "āŽ‡āŽ°ā¯āŽŖā¯āŽŸ", "dark_theme": "āŽ‡āŽ°ā¯āŽŖā¯āŽŸ āŽ•āŽ°ā¯āŽĒā¯āŽĒā¯ŠāŽ°ā¯āŽŗā¯ˆ āŽŽāŽžāŽąā¯āŽąāŽĩā¯āŽŽā¯", + "date": "āŽ¤ā¯‡āŽ¤āŽŋ", "date_after": "āŽ¤ā¯‡āŽ¤āŽŋ", "date_and_time": "āŽ¤ā¯‡āŽ¤āŽŋ āŽŽāŽąā¯āŽąā¯āŽŽā¯ āŽ¨ā¯‡āŽ°āŽŽā¯", "date_before": "āŽŽā¯āŽŠā¯ āŽ¤ā¯‡āŽ¤āŽŋ", @@ -1084,6 +1100,7 @@ "features_setting_description": "āŽĒāŽ¯āŽŠā¯āŽĒāŽžāŽŸā¯āŽŸā¯ āŽ…āŽŽā¯āŽšāŽ™ā¯āŽ•āŽŗā¯ˆ āŽ¨āŽŋāŽ°ā¯āŽĩāŽ•āŽŋāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "file_name": "āŽ•ā¯‹āŽĒā¯āŽĒ❁ āŽĒā¯†āŽ¯āŽ°ā¯", "file_name_or_extension": "āŽ•ā¯‹āŽĒā¯āŽĒ❁ āŽĒā¯†āŽ¯āŽ°ā¯ āŽ…āŽ˛ā¯āŽ˛āŽ¤ā¯ āŽ¨ā¯€āŽŸā¯āŽŸāŽŋāŽĒā¯āŽĒ❁", + "file_size": "āŽ•ā¯‹āŽĒā¯āŽĒ❁ āŽ…āŽŗāŽĩ❁", "filename": "āŽ•ā¯‹āŽĒā¯āŽĒ❁āŽĒā¯āŽĒā¯†āŽ¯āŽ°ā¯", "filetype": "āŽĒā¯ˆāŽ˛ā¯āŽŸā¯ˆāŽĒā¯", "filter": "āŽĩāŽŸāŽŋāŽĒā¯āŽĒāŽŋ", @@ -1247,6 +1264,7 @@ "local_media_summary": "āŽ‰āŽŗā¯āŽŗāŽ• āŽŠāŽŸāŽ• āŽšā¯āŽ°ā¯āŽ•ā¯āŽ•āŽŽā¯", "local_network": "āŽ‰āŽŗā¯āŽŗāŽ• āŽĒāŽŋāŽŖā¯ˆāŽ¯āŽŽā¯", "local_network_sheet_info": "āŽ•ā¯āŽąāŽŋāŽĒā¯āŽĒāŽŋāŽŸā¯āŽŸ āŽĩā¯ˆāŽƒāŽĒ❈ āŽ¨ā¯†āŽŸā¯āŽĩā¯ŠāŽ°ā¯āŽ•ā¯āŽ•ā¯ˆāŽĒā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤ā¯āŽŽā¯ āŽĒā¯‹āŽ¤ā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽžāŽŸā¯ āŽ‡āŽ¨ā¯āŽ¤ āŽŽā¯āŽ•āŽĩāŽ°āŽŋ āŽŽā¯‚āŽ˛āŽŽā¯ āŽšā¯‡āŽĩā¯ˆāŽ¯āŽ•āŽ¤ā¯āŽ¤ā¯āŽŸāŽŠā¯ āŽ‡āŽŖā¯ˆāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽŽā¯", + "location": "āŽ‡āŽŸāŽŽā¯", "location_permission": "āŽ‡āŽ°ā¯āŽĒā¯āŽĒāŽŋāŽŸ āŽ‡āŽšā¯ˆāŽĩ❁", "location_permission_content": "āŽ†āŽŸā¯āŽŸā¯‹-āŽšā¯āŽĩāŽŋāŽŸā¯āŽšāŽŋāŽ™ā¯ āŽ…āŽŽā¯āŽšāŽ¤ā¯āŽ¤ā¯ˆāŽĒā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤, āŽ‡āŽŽā¯āŽŽāŽŋāŽ•ā¯āŽ•ā¯ āŽ¤ā¯āŽ˛ā¯āŽ˛āŽŋāŽ¯āŽŽāŽžāŽŠ āŽ‡āŽ°ā¯āŽĒā¯āŽĒāŽŋāŽŸ āŽ‡āŽšā¯ˆāŽĩ❁ āŽ¤ā¯‡āŽĩ❈, āŽŽāŽŠāŽĩ❇ āŽ‡āŽ¤ā¯ āŽ¤āŽąā¯āŽĒā¯‹āŽ¤ā¯ˆāŽ¯ āŽĩā¯ˆāŽƒāŽĒ❈ āŽ¨ā¯†āŽŸā¯āŽĩā¯ŠāŽ°ā¯āŽ•ā¯āŽ•āŽŋāŽŠā¯ āŽĒā¯†āŽ¯āŽ°ā¯ˆāŽĒā¯ āŽĒāŽŸāŽŋāŽ•ā¯āŽ• āŽŽā¯āŽŸāŽŋāŽ¯ā¯āŽŽā¯", "location_picker_choose_on_map": "āŽĩāŽ°ā¯ˆāŽĒāŽŸāŽ¤ā¯āŽ¤āŽŋāŽ˛ā¯ āŽ¤ā¯‡āŽ°ā¯āŽĩ❁ āŽšā¯†āŽ¯ā¯āŽ¯āŽĩā¯āŽŽā¯", @@ -1435,6 +1453,7 @@ "oauth": "Oauth", "obtainium_configurator": "āŽ’āŽĒā¯āŽŸā¯†āŽ¯ā¯āŽŠāŽŋāŽ¯āŽŽā¯ āŽ•āŽŸā¯āŽŸāŽŽā¯ˆāŽĒā¯āŽĒāŽžāŽŗāŽ°ā¯", "obtainium_configurator_instructions": "Immich GitHub āŽĩā¯†āŽŗāŽŋāŽ¯ā¯€āŽŸā¯āŽŸāŽŋāŽ˛ā¯ āŽ‡āŽ°ā¯āŽ¨ā¯āŽ¤ā¯ āŽ¨ā¯‡āŽ°āŽŸāŽŋāŽ¯āŽžāŽ• āŽ†āŽŖā¯āŽŸā¯āŽ°āŽžāŽ¯ā¯āŽŸā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽžāŽŸā¯āŽŸā¯ˆ āŽ¨āŽŋāŽąā¯āŽĩāŽĩā¯āŽŽā¯ āŽĒā¯āŽ¤ā¯āŽĒā¯āŽĒāŽŋāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯ Obtainium āŽāŽĒā¯ āŽĒāŽ¯āŽŠā¯āŽĒāŽŸā¯āŽ¤ā¯āŽ¤āŽĩā¯āŽŽā¯. āŽĒāŽ¨āŽŋāŽ‡ āŽĩāŽŋāŽšā¯ˆāŽ¯ā¯ˆ āŽ‰āŽ°ā¯āŽĩāŽžāŽ•ā¯āŽ•āŽŋ, āŽ‰āŽ™ā¯āŽ•āŽŗā¯ āŽ’āŽĒā¯āŽŸā¯†āŽ¯ā¯āŽŠāŽŋāŽ¯āŽŽā¯ āŽ‰āŽŗā¯āŽŗāŽŽā¯ˆāŽĩ❁ āŽ‡āŽŖā¯ˆāŽĒā¯āŽĒ❈ āŽ‰āŽ°ā¯āŽĩāŽžāŽ•ā¯āŽ• āŽ’āŽ°ā¯ āŽŽāŽžāŽąā¯āŽĒāŽžāŽŸā¯āŽŸā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽ°ā¯āŽ¨ā¯āŽ¤ā¯†āŽŸā¯āŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", + "ocr": "āŽ“āŽšāŽŋāŽ†āŽ°ā¯", "official_immich_resources": "āŽ‰āŽ¤ā¯āŽ¤āŽŋāŽ¯ā¯‹āŽ•āŽĒā¯‚āŽ°ā¯āŽĩ āŽ‡āŽŽā¯āŽŽāŽž āŽĩāŽŗāŽ™ā¯āŽ•āŽŗā¯", "offline": "āŽ‡āŽŖā¯ˆāŽ¯āŽŽāŽŋāŽ˛ā¯āŽ˛āŽžāŽŽāŽ˛ā¯", "offset": "āŽˆāŽŸā¯āŽšā¯†āŽ¯ā¯āŽ¯ā¯āŽŽā¯", @@ -1678,6 +1697,7 @@ "reset_sqlite_confirmation": "SQLITE āŽ¤āŽ°āŽĩā¯āŽ¤ā¯āŽ¤āŽŗāŽ¤ā¯āŽ¤ā¯ˆ āŽŽā¯€āŽŸā¯āŽŸāŽŽā¯ˆāŽ•ā¯āŽ• āŽĩāŽŋāŽ°ā¯āŽŽā¯āŽĒā¯āŽ•āŽŋāŽąā¯€āŽ°ā¯āŽ•āŽŗāŽž? āŽ¤āŽ°āŽĩ❈ āŽŽā¯€āŽŖā¯āŽŸā¯āŽŽā¯ āŽ’āŽ¤ā¯āŽ¤āŽŋāŽšā¯ˆāŽ•ā¯āŽ• āŽ¨ā¯€āŽ™ā¯āŽ•āŽŗā¯ āŽĩā¯†āŽŗāŽŋāŽ¯ā¯‡āŽąāŽŋ āŽŽā¯€āŽŖā¯āŽŸā¯āŽŽā¯ āŽ‰āŽŗā¯āŽ¨ā¯āŽ´ā¯ˆāŽ¯ āŽĩā¯‡āŽŖā¯āŽŸā¯āŽŽā¯", "reset_sqlite_success": "SQLITE āŽ¤āŽ°āŽĩā¯āŽ¤ā¯āŽ¤āŽŗāŽ¤ā¯āŽ¤ā¯ˆ āŽĩā¯†āŽąā¯āŽąāŽŋāŽ•āŽ°āŽŽāŽžāŽ• āŽŽā¯€āŽŸā¯āŽŸāŽŽā¯ˆāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "reset_to_default": "āŽ‡āŽ¯āŽ˛ā¯āŽĒā¯āŽ¨āŽŋāŽ˛ā¯ˆāŽ•ā¯āŽ•ā¯ āŽŽā¯€āŽŸā¯āŽŸāŽŽā¯ˆāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", + "resolution": "āŽ¤ā¯†āŽŗāŽŋāŽĩā¯āŽ¤ā¯āŽ¤āŽŋāŽąāŽŠā¯", "resolve_duplicates": "āŽ¨āŽ•āŽ˛ā¯āŽ•āŽŗā¯ˆāŽ¤ā¯ āŽ¤ā¯€āŽ°ā¯āŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "resolved_all_duplicates": "āŽ…āŽŠā¯ˆāŽ¤ā¯āŽ¤ā¯ āŽ¨āŽ•āŽ˛ā¯āŽ•āŽŗā¯ˆāŽ¯ā¯āŽŽā¯ āŽ¤ā¯€āŽ°ā¯āŽ•ā¯āŽ•ā¯āŽŽā¯", "restore": "āŽŽā¯€āŽŸā¯āŽŸāŽŽā¯ˆ", @@ -1696,6 +1716,7 @@ "running": "āŽ‡āŽ¯āŽ™ā¯āŽ•ā¯āŽŽā¯", "save": "āŽšā¯‡āŽŽāŽŋ", "save_to_gallery": "āŽ•ā¯‡āŽ˛āŽ°āŽŋāŽ¯āŽŋāŽ˛ā¯ āŽšā¯‡āŽŽāŽŋāŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", + "saved": "āŽšā¯‡āŽŽāŽŋāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽŸāŽ¤ā¯", "saved_api_key": "āŽšā¯‡āŽŽāŽŋāŽ¤ā¯āŽ¤ āŽĒāŽ¨āŽŋāŽ‡ āŽĩāŽŋāŽšā¯ˆ", "saved_profile": "āŽšā¯‡āŽŽāŽŋāŽ¤ā¯āŽ¤ āŽšā¯āŽ¯āŽĩāŽŋāŽĩāŽ°āŽŽā¯", "saved_settings": "āŽšā¯‡āŽŽāŽŋāŽ¤ā¯āŽ¤ āŽ…āŽŽā¯ˆāŽĒā¯āŽĒā¯āŽ•āŽŗā¯", @@ -1712,6 +1733,8 @@ "search_by_description_example": "āŽšāŽĒā¯āŽĒāŽžāŽĩāŽŋāŽ˛ā¯ āŽ¨āŽŸā¯ˆāŽĒāŽ¯āŽŖāŽŽā¯", "search_by_filename": "āŽ•ā¯‹āŽĒā¯āŽĒ❁ āŽĒā¯†āŽ¯āŽ°ā¯ āŽ…āŽ˛ā¯āŽ˛āŽ¤ā¯ āŽ¨ā¯€āŽŸā¯āŽŸāŽŋāŽĒā¯āŽĒ❁ āŽŽā¯‚āŽ˛āŽŽā¯ āŽ¤ā¯‡āŽŸā¯āŽ™ā¯āŽ•āŽŗā¯", "search_by_filename_example": "I.E. IMG_1234.JPG āŽ…āŽ˛ā¯āŽ˛āŽ¤ā¯ PNG", + "search_by_ocr": "āŽ“āŽšāŽŋāŽ†āŽ°ā¯ āŽŽā¯‚āŽ˛āŽŽā¯ āŽ¤ā¯‡āŽŸā¯", + "search_by_ocr_example": "āŽ˛ā¯‡āŽŸā¯", "search_camera_lens_model": "āŽ•āŽŖā¯āŽŖāŽžāŽŸāŽŋ āŽĩāŽŋāŽ˛ā¯āŽ˛ā¯ˆ āŽŽāŽžāŽ¤āŽŋāŽ°āŽŋāŽ¯ā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽŸā¯...", "search_camera_make": "āŽ¤ā¯‡āŽŸāŽ˛ā¯ āŽ•ā¯‡āŽŽāŽ°āŽž āŽšā¯†āŽ¯ā¯āŽ¯ā¯āŽ™ā¯āŽ•āŽŗā¯ ...", "search_camera_model": "āŽ•ā¯‡āŽŽāŽ°āŽž āŽŽāŽžāŽ¤āŽŋāŽ°āŽŋāŽ¯ā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽŸā¯āŽ™ā¯āŽ•āŽŗā¯ ...", @@ -1729,6 +1752,7 @@ "search_filter_location_title": "āŽ‡āŽ°ā¯āŽĒā¯āŽĒāŽŋāŽŸāŽ¤ā¯āŽ¤ā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽ°ā¯āŽ¨ā¯āŽ¤ā¯†āŽŸā¯āŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "search_filter_media_type": "āŽŠāŽŸāŽ• āŽĩāŽ•ā¯ˆ", "search_filter_media_type_title": "āŽŽā¯€āŽŸāŽŋāŽ¯āŽž āŽĩāŽ•ā¯ˆāŽ¯ā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽ°ā¯āŽ¨ā¯āŽ¤ā¯†āŽŸā¯āŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", + "search_filter_ocr": "āŽ“āŽšāŽŋāŽ†āŽ°ā¯ āŽŽā¯‚āŽ˛āŽŽā¯ āŽ¤ā¯‡āŽŸā¯", "search_filter_people_title": "āŽŽāŽ•ā¯āŽ•āŽŗā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽ°ā¯āŽ¨ā¯āŽ¤ā¯†āŽŸā¯āŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "search_for": "āŽ¤ā¯‡āŽŸā¯āŽ™ā¯āŽ•āŽŗā¯", "search_for_existing_person": "āŽ‡āŽ°ā¯āŽ•ā¯āŽ•ā¯āŽŽā¯ āŽ¨āŽĒāŽ°ā¯ˆāŽ¤ā¯ āŽ¤ā¯‡āŽŸā¯āŽ™ā¯āŽ•āŽŗā¯", @@ -2001,6 +2025,7 @@ "theme_setting_three_stage_loading_title": "āŽŽā¯‚āŽŠā¯āŽąā¯-āŽ¨āŽŋāŽ˛ā¯ˆ āŽāŽąā¯āŽąā¯āŽ¤āŽ˛ā¯ˆ āŽ‡āŽ¯āŽ•ā¯āŽ•āŽĩā¯āŽŽā¯", "they_will_be_merged_together": "āŽ…āŽĩāŽ°ā¯āŽ•āŽŗā¯ āŽ’āŽŠā¯āŽąāŽžāŽ• āŽ‡āŽŖā¯ˆāŽ•ā¯āŽ•āŽĒā¯āŽĒāŽŸā¯āŽĩāŽžāŽ°ā¯āŽ•āŽŗā¯", "third_party_resources": "āŽŽā¯‚āŽŠā¯āŽąāŽžāŽŽā¯ āŽ¤āŽ°āŽĒā¯āŽĒ❁ āŽĩāŽŗāŽ™ā¯āŽ•āŽŗā¯", + "time": "āŽ¨ā¯‡āŽ°āŽŽā¯", "time_based_memories": "āŽ¨ā¯‡āŽ° āŽ…āŽŸāŽŋāŽĒā¯āŽĒāŽŸā¯ˆāŽ¯āŽŋāŽ˛āŽžāŽŠ āŽ¨āŽŋāŽŠā¯ˆāŽĩā¯āŽ•āŽŗā¯", "timeline": "āŽ•āŽžāŽ˛āŽĩāŽ°āŽŋāŽšā¯ˆ", "timezone": "āŽ¨ā¯‡āŽ° āŽŽāŽŖā¯āŽŸāŽ˛āŽŽā¯", diff --git a/i18n/tr.json b/i18n/tr.json index 84a246ddc5..1c1f4c7354 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -163,6 +163,7 @@ "machine_learning_ocr_min_detection_score": "En dÃŧşÃŧk tespit puanÄą", "machine_learning_ocr_min_detection_score_description": "Metnin tespit edilmesi için minimum gÃŧven puanÄą 0-1 arasÄąndadÄąr. DÃŧşÃŧk değerler daha fazla metin tespit eder, ancak yanlÄąÅŸ pozitif sonuçlara yol açabilir.", "machine_learning_ocr_min_recognition_score": "Minimum tespit puanÄą", + "machine_learning_ocr_model": "OCR modeli", "machine_learning_settings": "Makine Öğrenmesi ayarlarÄą", "machine_learning_settings_description": "Makine Ãļğrenmesi Ãļzelliklerini ve ayarlarÄąnÄą yÃļnet", "machine_learning_smart_search": "AkÄąllÄą Arama", @@ -785,6 +786,7 @@ "daily_title_text_date_year": "dd MMM yyyy E", "dark": "Koyu", "dark_theme": "KaranlÄąk temaya geç", + "date": "Tarih", "date_after": "Sonraki tarih", "date_and_time": "Tarih ve Zaman", "date_before": "Önceki tarih", @@ -1093,6 +1095,7 @@ "features_setting_description": "UygulamanÄąn Ãļzelliklerini yÃļnet", "file_name": "Dosya adÄą", "file_name_or_extension": "Dosya adÄą veya uzantÄą", + "file_size": "Dosya boyutu", "filename": "Dosya adÄą", "filetype": "Dosya tipi", "filter": "Filtre", @@ -1444,6 +1447,7 @@ "oauth": "OAuth", "obtainium_configurator": "Obtainium YapÄąlandÄąrÄącÄą", "obtainium_configurator_instructions": "Obtainium kullanarak Android uygulamasÄąnÄą doğrudan Immich GitHub sÃŧrÃŧmÃŧnden yÃŧkleyin ve gÃŧncelleyin. Bir API anahtarÄą oluşturun ve bir varyant seçerek Obtainium yapÄąlandÄąrma bağlantÄąnÄązÄą oluşturun", + "ocr": "OCR", "official_immich_resources": "Resmi Immich KaynaklarÄą", "offline": "Çevrim dÄąÅŸÄą", "offset": "Ofset", @@ -1687,6 +1691,7 @@ "reset_sqlite_confirmation": "SQLite veritabanÄąnÄą sÄąfÄąrlamak istediğinizden emin misiniz? Verileri yeniden eşzamanlamak için oturumu kapatÄąp tekrar oturum açmanÄąz gerekecektir", "reset_sqlite_success": "SQLite veritabanÄąnÄą başarÄąyla sÄąfÄąrladÄąnÄąz", "reset_to_default": "VarsayÄąlana sÄąfÄąrla", + "resolution": "ÇÃļzÃŧnÃŧrlÃŧk", "resolve_duplicates": "Çiftleri çÃļz", "resolved_all_duplicates": "TÃŧm çiftler çÃļzÃŧldÃŧ", "restore": "Geri yÃŧkle", @@ -2010,6 +2015,7 @@ "theme_setting_three_stage_loading_title": "Üç aşamalÄą yÃŧklemeyi etkinleştir", "they_will_be_merged_together": "Birlikte birleştirilecekler", "third_party_resources": "ÜçÃŧncÃŧ taraf kaynaklar", + "time": "Zaman", "time_based_memories": "Zaman bazlÄą anÄąlar", "timeline": "Zaman Çizelgesi", "timezone": "Zaman dilimi", diff --git a/i18n/zh_Hant.json b/i18n/zh_Hant.json index 16c6e9c926..8baeaec7d8 100644 --- a/i18n/zh_Hant.json +++ b/i18n/zh_Hant.json @@ -154,6 +154,8 @@ "machine_learning_min_detection_score_description": "臉孔åĩæ¸Ŧįš„æœ€äŊŽäŋĄåŋƒåˆ†æ•¸īŧŒį¯„圍į‚ē 0 臺 1。數å€ŧčŧƒäŊŽæ™‚會åĩæ¸Ŧåˆ°æ›´å¤šč‡‰å­”īŧŒäŊ†å¯čƒŊå°Žč‡´čĒ¤åˆ¤ã€‚", "machine_learning_min_recognized_faces": "最äŊŽč‡‰éƒ¨čž¨č­˜æ•¸é‡", "machine_learning_min_recognized_faces_description": "åģēįĢ‹æ–°äēēį‰Šæ‰€éœ€įš„æœ€äŊŽåˇ˛čž¨č­˜č‡‰å­”數量。提éĢ˜æ­¤æ•¸å€ŧå¯čŽ“č‡‰å­”čž¨č­˜æ›´į˛žįĸēīŧŒäŊ†åŒæ™‚會åĸžåР臉孔æœĒčĸĢæŒ‡æ´žįĩĻäģģäŊ•äēēį‰Šįš„å¯čƒŊ性。", + "machine_learning_ocr": "æ–‡å­—čž¨č­˜(OCR)", + "machine_learning_ocr_description": "äŊŋį”¨æŠŸå™¨å­¸įŋ’äž†č­˜åˆĨåœ–į‰‡ä¸­įš„æ–‡å­—", "machine_learning_settings": "抟器學įŋ’設åޚ", "machine_learning_settings_description": "įŽĄį†æŠŸå™¨å­¸įŋ’įš„åŠŸčƒŊå’Œč¨­åŽš", "machine_learning_smart_search": "æ™ē慧搜尋", @@ -245,6 +247,7 @@ "oauth_storage_quota_default_description": "æœĒæäž›åŽŖå‘Šæ™‚æ‰€äŊŋį”¨įš„é…éĄīŧˆGiBīŧ‰ã€‚", "oauth_timeout": "čĢ‹æą‚é€žæ™‚", "oauth_timeout_description": "čĢ‹æą‚įš„é€žæ™‚æ™‚é–“īŧˆæ¯Ģį§’īŧ‰", + "ocr_job_description": "äŊŋį”¨æŠŸå™¨å­¸įŋ’äž†č­˜åˆĨåœ–åƒä¸­įš„æ–‡å­—", "password_enable_description": "äŊŋᔍé›ģ子éƒĩäģļ和密įĸŧį™ģå…Ĩ", "password_settings": "密įĸŧį™ģå…Ĩ", "password_settings_description": "įŽĄį†å¯†įĸŧį™ģå…Ĩč¨­åŽš", diff --git a/machine-learning/immich_ml/config.py b/machine-learning/immich_ml/config.py index 68d00625a3..19fd5300df 100644 --- a/machine-learning/immich_ml/config.py +++ b/machine-learning/immich_ml/config.py @@ -13,6 +13,8 @@ from rich.logging import RichHandler from uvicorn import Server from uvicorn.workers import UvicornWorker +from .schemas import ModelPrecision + class ClipSettings(BaseModel): textual: str | None = None @@ -24,6 +26,11 @@ class FacialRecognitionSettings(BaseModel): detection: str | None = None +class OcrSettings(BaseModel): + recognition: str | None = None + detection: str | None = None + + class PreloadModelData(BaseModel): clip_fallback: str | None = os.getenv("MACHINE_LEARNING_PRELOAD__CLIP", None) facial_recognition_fallback: str | None = os.getenv("MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION", None) @@ -37,6 +44,7 @@ class PreloadModelData(BaseModel): del os.environ["MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION"] clip: ClipSettings = ClipSettings() facial_recognition: FacialRecognitionSettings = FacialRecognitionSettings() + ocr: OcrSettings = OcrSettings() class MaxBatchSize(BaseModel): @@ -70,6 +78,7 @@ class Settings(BaseSettings): rknn_threads: int = 1 preload: PreloadModelData | None = None max_batch_size: MaxBatchSize | None = None + openvino_precision: ModelPrecision = ModelPrecision.FP32 @property def device_id(self) -> str: diff --git a/machine-learning/immich_ml/main.py b/machine-learning/immich_ml/main.py index 35f04d77ef..3d34d9bf9d 100644 --- a/machine-learning/immich_ml/main.py +++ b/machine-learning/immich_ml/main.py @@ -103,6 +103,20 @@ async def preload_models(preload: PreloadModelData) -> None: ModelTask.FACIAL_RECOGNITION, ) + if preload.ocr.detection is not None: + await load_models( + preload.ocr.detection, + ModelType.DETECTION, + ModelTask.OCR, + ) + + if preload.ocr.recognition is not None: + await load_models( + preload.ocr.recognition, + ModelType.RECOGNITION, + ModelTask.OCR, + ) + if preload.clip_fallback is not None: log.warning( "Deprecated env variable: 'MACHINE_LEARNING_PRELOAD__CLIP'. " diff --git a/machine-learning/immich_ml/models/constants.py b/machine-learning/immich_ml/models/constants.py index 10a4ae48a9..db9e7cfa4d 100644 --- a/machine-learning/immich_ml/models/constants.py +++ b/machine-learning/immich_ml/models/constants.py @@ -78,6 +78,14 @@ _INSIGHTFACE_MODELS = { _PADDLE_MODELS = { "PP-OCRv5_server", "PP-OCRv5_mobile", + "CH__PP-OCRv5_server", + "CH__PP-OCRv5_mobile", + "EL__PP-OCRv5_mobile", + "EN__PP-OCRv5_mobile", + "ESLAV__PP-OCRv5_mobile", + "KOREAN__PP-OCRv5_mobile", + "LATIN__PP-OCRv5_mobile", + "TH__PP-OCRv5_mobile", } SUPPORTED_PROVIDERS = [ diff --git a/machine-learning/immich_ml/models/ocr/detection.py b/machine-learning/immich_ml/models/ocr/detection.py index 235fcc677e..07a2f3cce2 100644 --- a/machine-learning/immich_ml/models/ocr/detection.py +++ b/machine-learning/immich_ml/models/ocr/detection.py @@ -1,8 +1,10 @@ from typing import Any +import cv2 import numpy as np +from numpy.typing import NDArray from PIL import Image -from rapidocr.ch_ppocr_det import TextDetector as RapidTextDetector +from rapidocr.ch_ppocr_det.utils import DBPostProcess from rapidocr.inference_engine.base import FileInfo, InferSession from rapidocr.utils import DownloadFile, DownloadFileInput from rapidocr.utils.typings import EngineType, LangDet, OCRVersion, TaskType @@ -10,11 +12,10 @@ from rapidocr.utils.typings import ModelType as RapidModelType from immich_ml.config import log from immich_ml.models.base import InferenceModel -from immich_ml.models.transforms import decode_cv2 from immich_ml.schemas import ModelFormat, ModelSession, ModelTask, ModelType from immich_ml.sessions.ort import OrtSession -from .schemas import OcrOptions, TextDetectionOutput +from .schemas import TextDetectionOutput class TextDetector(InferenceModel): @@ -22,15 +23,22 @@ class TextDetector(InferenceModel): identity = (ModelType.DETECTION, ModelTask.OCR) def __init__(self, model_name: str, **model_kwargs: Any) -> None: - super().__init__(model_name, **model_kwargs, model_format=ModelFormat.ONNX) + super().__init__(model_name.split("__")[-1], **model_kwargs, model_format=ModelFormat.ONNX) self.max_resolution = 736 - self.min_score = 0.5 - self.score_mode = "fast" + self.mean = np.array([0.5, 0.5, 0.5], dtype=np.float32) + self.std_inv = np.float32(1.0) / (np.array([0.5, 0.5, 0.5], dtype=np.float32) * 255.0) self._empty: TextDetectionOutput = { - "image": np.empty(0, dtype=np.float32), "boxes": np.empty(0, dtype=np.float32), "scores": np.empty(0, dtype=np.float32), } + self.postprocess = DBPostProcess( + thresh=0.3, + box_thresh=model_kwargs.get("minScore", 0.5), + max_candidates=1000, + unclip_ratio=1.6, + use_dilation=True, + score_mode="fast", + ) def _download(self) -> None: model_info = InferSession.get_model_url( @@ -52,35 +60,65 @@ class TextDetector(InferenceModel): def _load(self) -> ModelSession: # TODO: support other runtime sessions - session = OrtSession(self.model_path) - self.model = RapidTextDetector( - OcrOptions( - session=session.session, - limit_side_len=self.max_resolution, - limit_type="min", - box_thresh=self.min_score, - score_mode=self.score_mode, - ) - ) - return session + return OrtSession(self.model_path) - def _predict(self, inputs: bytes | Image.Image) -> TextDetectionOutput: - results = self.model(decode_cv2(inputs)) - if results.boxes is None or results.scores is None or results.img is None: + # partly adapted from RapidOCR + def _predict(self, inputs: Image.Image) -> TextDetectionOutput: + w, h = inputs.size + if w < 32 or h < 32: + return self._empty + out = self.session.run(None, {"x": self._transform(inputs)})[0] + boxes, scores = self.postprocess(out, (h, w)) + if len(boxes) == 0: return self._empty return { - "image": results.img, - "boxes": np.array(results.boxes, dtype=np.float32), - "scores": np.array(results.scores, dtype=np.float32), + "boxes": self.sorted_boxes(boxes), + "scores": np.array(scores, dtype=np.float32), } + # adapted from RapidOCR + def _transform(self, img: Image.Image) -> NDArray[np.float32]: + if img.height < img.width: + ratio = float(self.max_resolution) / img.height + else: + ratio = float(self.max_resolution) / img.width + + resize_h = int(img.height * ratio) + resize_w = int(img.width * ratio) + + resize_h = int(round(resize_h / 32) * 32) + resize_w = int(round(resize_w / 32) * 32) + resized_img = img.resize((int(resize_w), int(resize_h)), resample=Image.Resampling.LANCZOS) + + img_np: NDArray[np.float32] = cv2.cvtColor(np.array(resized_img, dtype=np.float32), cv2.COLOR_RGB2BGR) # type: ignore + img_np -= self.mean + img_np *= self.std_inv + img_np = np.transpose(img_np, (2, 0, 1)) + return np.expand_dims(img_np, axis=0) + + def sorted_boxes(self, dt_boxes: NDArray[np.float32]) -> NDArray[np.float32]: + if len(dt_boxes) == 0: + return dt_boxes + + # Sort by y, then identify lines, then sort by (line, x) + y_order = np.argsort(dt_boxes[:, 0, 1], kind="stable") + sorted_y = dt_boxes[y_order, 0, 1] + + line_ids = np.empty(len(dt_boxes), dtype=np.int32) + line_ids[0] = 0 + np.cumsum(np.abs(np.diff(sorted_y)) >= 10, out=line_ids[1:]) + + # Create composite sort key for final ordering + # Shift line_ids by large factor, add x for tie-breaking + sort_key = line_ids[y_order] * 1e6 + dt_boxes[y_order, 0, 0] + final_order = np.argsort(sort_key, kind="stable") + sorted_boxes: NDArray[np.float32] = dt_boxes[y_order[final_order]] + return sorted_boxes + def configure(self, **kwargs: Any) -> None: if (max_resolution := kwargs.get("maxResolution")) is not None: self.max_resolution = max_resolution - self.model.limit_side_len = max_resolution if (min_score := kwargs.get("minScore")) is not None: - self.min_score = min_score - self.model.postprocess_op.box_thresh = min_score + self.postprocess.box_thresh = min_score if (score_mode := kwargs.get("scoreMode")) is not None: - self.score_mode = score_mode - self.model.postprocess_op.score_mode = score_mode + self.postprocess.score_mode = score_mode diff --git a/machine-learning/immich_ml/models/ocr/recognition.py b/machine-learning/immich_ml/models/ocr/recognition.py index c3d39b0d70..af3f99dbdb 100644 --- a/machine-learning/immich_ml/models/ocr/recognition.py +++ b/machine-learning/immich_ml/models/ocr/recognition.py @@ -1,9 +1,8 @@ from typing import Any -import cv2 import numpy as np from numpy.typing import NDArray -from PIL.Image import Image +from PIL import Image from rapidocr.ch_ppocr_rec import TextRecInput from rapidocr.ch_ppocr_rec import TextRecognizer as RapidTextRecognizer from rapidocr.inference_engine.base import FileInfo, InferSession @@ -14,6 +13,7 @@ from rapidocr.utils.vis_res import VisRes from immich_ml.config import log, settings from immich_ml.models.base import InferenceModel +from immich_ml.models.transforms import pil_to_cv2 from immich_ml.schemas import ModelFormat, ModelSession, ModelTask, ModelType from immich_ml.sessions.ort import OrtSession @@ -25,6 +25,7 @@ class TextRecognizer(InferenceModel): identity = (ModelType.RECOGNITION, ModelTask.OCR) def __init__(self, model_name: str, **model_kwargs: Any) -> None: + self.language = LangRec[model_name.split("__")[0]] if "__" in model_name else LangRec.CH self.min_score = model_kwargs.get("minScore", 0.9) self._empty: TextRecognitionOutput = { "box": np.empty(0, dtype=np.float32), @@ -41,7 +42,7 @@ class TextRecognizer(InferenceModel): engine_type=EngineType.ONNXRUNTIME, ocr_version=OCRVersion.PPOCRV5, task_type=TaskType.REC, - lang_type=LangRec.CH, + lang_type=self.language, model_type=RapidModelType.MOBILE if "mobile" in self.model_name else RapidModelType.SERVER, ) ) @@ -61,21 +62,21 @@ class TextRecognizer(InferenceModel): session=session.session, rec_batch_num=settings.max_batch_size.text_recognition if settings.max_batch_size is not None else 6, rec_img_shape=(3, 48, 320), + lang_type=self.language, ) ) return session - def _predict(self, _: Image, texts: TextDetectionOutput) -> TextRecognitionOutput: - boxes, img, box_scores = texts["boxes"], texts["image"], texts["scores"] + def _predict(self, img: Image.Image, texts: TextDetectionOutput) -> TextRecognitionOutput: + boxes, box_scores = texts["boxes"], texts["scores"] if boxes.shape[0] == 0: return self._empty rec = self.model(TextRecInput(img=self.get_crop_img_list(img, boxes))) if rec.txts is None: return self._empty - height, width = img.shape[0:2] - boxes[:, :, 0] /= width - boxes[:, :, 1] /= height + boxes[:, :, 0] /= img.width + boxes[:, :, 1] /= img.height text_scores = np.array(rec.scores) valid_text_score_idx = text_scores > self.min_score @@ -87,7 +88,7 @@ class TextRecognizer(InferenceModel): "textScore": text_scores[valid_text_score_idx], } - def get_crop_img_list(self, img: NDArray[np.float32], boxes: NDArray[np.float32]) -> list[NDArray[np.float32]]: + def get_crop_img_list(self, img: Image.Image, boxes: NDArray[np.float32]) -> list[NDArray[np.uint8]]: img_crop_width = np.maximum( np.linalg.norm(boxes[:, 1] - boxes[:, 0], axis=1), np.linalg.norm(boxes[:, 2] - boxes[:, 3], axis=1) ).astype(np.int32) @@ -98,22 +99,55 @@ class TextRecognizer(InferenceModel): pts_std[:, 1:3, 0] = img_crop_width[:, None] pts_std[:, 2:4, 1] = img_crop_height[:, None] - img_crop_sizes = np.stack([img_crop_width, img_crop_height], axis=1).tolist() - imgs: list[NDArray[np.float32]] = [] - for box, pts_std, dst_size in zip(list(boxes), list(pts_std), img_crop_sizes): - M = cv2.getPerspectiveTransform(box, pts_std) - dst_img: NDArray[np.float32] = cv2.warpPerspective( - img, - M, - dst_size, - borderMode=cv2.BORDER_REPLICATE, - flags=cv2.INTER_CUBIC, - ) # type: ignore - dst_height, dst_width = dst_img.shape[0:2] + img_crop_sizes = np.stack([img_crop_width, img_crop_height], axis=1) + all_coeffs = self._get_perspective_transform(pts_std, boxes) + imgs: list[NDArray[np.uint8]] = [] + for coeffs, dst_size in zip(all_coeffs, img_crop_sizes): + dst_img = img.transform( + size=tuple(dst_size), + method=Image.Transform.PERSPECTIVE, + data=tuple(coeffs), + resample=Image.Resampling.BICUBIC, + ) + + dst_width, dst_height = dst_img.size if dst_height * 1.0 / dst_width >= 1.5: - dst_img = np.rot90(dst_img) - imgs.append(dst_img) + dst_img = dst_img.rotate(90, expand=True) + imgs.append(pil_to_cv2(dst_img)) + return imgs + def _get_perspective_transform(self, src: NDArray[np.float32], dst: NDArray[np.float32]) -> NDArray[np.float32]: + N = src.shape[0] + x, y = src[:, :, 0], src[:, :, 1] + u, v = dst[:, :, 0], dst[:, :, 1] + A = np.zeros((N, 8, 9), dtype=np.float32) + + # Fill even rows (0, 2, 4, 6): [x, y, 1, 0, 0, 0, -u*x, -u*y, -u] + A[:, ::2, 0] = x + A[:, ::2, 1] = y + A[:, ::2, 2] = 1 + A[:, ::2, 6] = -u * x + A[:, ::2, 7] = -u * y + A[:, ::2, 8] = -u + + # Fill odd rows (1, 3, 5, 7): [0, 0, 0, x, y, 1, -v*x, -v*y, -v] + A[:, 1::2, 3] = x + A[:, 1::2, 4] = y + A[:, 1::2, 5] = 1 + A[:, 1::2, 6] = -v * x + A[:, 1::2, 7] = -v * y + A[:, 1::2, 8] = -v + + # Solve using SVD for all matrices at once + _, _, Vt = np.linalg.svd(A) + H = Vt[:, -1, :].reshape(N, 3, 3) + H = H / H[:, 2:3, 2:3] + + # Extract the 8 coefficients for each transformation + return np.column_stack( + [H[:, 0, 0], H[:, 0, 1], H[:, 0, 2], H[:, 1, 0], H[:, 1, 1], H[:, 1, 2], H[:, 2, 0], H[:, 2, 1]] + ) # pyright: ignore[reportReturnType] + def configure(self, **kwargs: Any) -> None: self.min_score = kwargs.get("minScore", self.min_score) diff --git a/machine-learning/immich_ml/models/ocr/schemas.py b/machine-learning/immich_ml/models/ocr/schemas.py index 14a7d3cea0..78e8619a0b 100644 --- a/machine-learning/immich_ml/models/ocr/schemas.py +++ b/machine-learning/immich_ml/models/ocr/schemas.py @@ -7,7 +7,6 @@ from typing_extensions import TypedDict class TextDetectionOutput(TypedDict): - image: npt.NDArray[np.float32] boxes: npt.NDArray[np.float32] scores: npt.NDArray[np.float32] @@ -21,8 +20,8 @@ class TextRecognitionOutput(TypedDict): # RapidOCR expects `engine_type`, `lang_type`, and `font_path` to be attributes class OcrOptions(dict[str, Any]): - def __init__(self, **options: Any) -> None: + def __init__(self, lang_type: LangRec | None = None, **options: Any) -> None: super().__init__(**options) self.engine_type = EngineType.ONNXRUNTIME - self.lang_type = LangRec.CH + self.lang_type = lang_type self.font_path = None diff --git a/machine-learning/immich_ml/schemas.py b/machine-learning/immich_ml/schemas.py index bfb40b9c84..41706180de 100644 --- a/machine-learning/immich_ml/schemas.py +++ b/machine-learning/immich_ml/schemas.py @@ -46,6 +46,11 @@ class ModelSource(StrEnum): PADDLE = "paddle" +class ModelPrecision(StrEnum): + FP16 = "FP16" + FP32 = "FP32" + + ModelIdentity = tuple[ModelType, ModelTask] diff --git a/machine-learning/immich_ml/sessions/ort.py b/machine-learning/immich_ml/sessions/ort.py index b6f709a323..6c52936722 100644 --- a/machine-learning/immich_ml/sessions/ort.py +++ b/machine-learning/immich_ml/sessions/ort.py @@ -93,10 +93,12 @@ class OrtSession: case "CUDAExecutionProvider" | "ROCMExecutionProvider": options = {"arena_extend_strategy": "kSameAsRequested", "device_id": settings.device_id} case "OpenVINOExecutionProvider": + openvino_dir = self.model_path.parent / "openvino" + device = f"GPU.{settings.device_id}" options = { - "device_type": f"GPU.{settings.device_id}", - "precision": "FP32", - "cache_dir": (self.model_path.parent / "openvino").as_posix(), + "device_type": device, + "precision": settings.openvino_precision.value, + "cache_dir": openvino_dir.as_posix(), } case "CoreMLExecutionProvider": options = { diff --git a/machine-learning/pyproject.toml b/machine-learning/pyproject.toml index f2931baeb3..a93ab1c2af 100644 --- a/machine-learning/pyproject.toml +++ b/machine-learning/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "immich-ml" -version = "2.2.0" +version = "2.2.3" description = "" authors = [{ name = "Hau Tran", email = "alex.tran1502@gmail.com" }] requires-python = ">=3.10,<4.0" @@ -22,7 +22,6 @@ dependencies = [ "rich>=13.4.2", "tokenizers>=0.15.0,<1.0", "uvicorn[standard]>=0.22.0,<1.0", - "setuptools>=78.1.0", "rapidocr>=3.1.0", ] diff --git a/machine-learning/test_main.py b/machine-learning/test_main.py index 582a05a950..eb8706fc19 100644 --- a/machine-learning/test_main.py +++ b/machine-learning/test_main.py @@ -26,7 +26,7 @@ from immich_ml.models.clip.textual import MClipTextualEncoder, OpenClipTextualEn from immich_ml.models.clip.visual import OpenClipVisualEncoder from immich_ml.models.facial_recognition.detection import FaceDetector from immich_ml.models.facial_recognition.recognition import FaceRecognizer -from immich_ml.schemas import ModelFormat, ModelTask, ModelType +from immich_ml.schemas import ModelFormat, ModelPrecision, ModelTask, ModelType from immich_ml.sessions.ann import AnnSession from immich_ml.sessions.ort import OrtSession from immich_ml.sessions.rknn import RknnSession, run_inference @@ -240,11 +240,16 @@ class TestOrtSession: @pytest.mark.ov_device_ids(["GPU.0", "CPU"]) def test_sets_default_provider_options(self, ov_device_ids: list[str]) -> None: - model_path = "/cache/ViT-B-32__openai/model.onnx" + model_path = "/cache/ViT-B-32__openai/textual/model.onnx" + session = OrtSession(model_path, providers=["OpenVINOExecutionProvider", "CPUExecutionProvider"]) assert session.provider_options == [ - {"device_type": "GPU.0", "precision": "FP32", "cache_dir": "/cache/ViT-B-32__openai/openvino"}, + { + "device_type": "GPU.0", + "precision": "FP32", + "cache_dir": "/cache/ViT-B-32__openai/textual/openvino", + }, {"arena_extend_strategy": "kSameAsRequested"}, ] @@ -262,6 +267,21 @@ class TestOrtSession: } ] + def test_sets_openvino_to_fp16_if_enabled(self, mocker: MockerFixture) -> None: + model_path = "/cache/ViT-B-32__openai/textual/model.onnx" + os.environ["MACHINE_LEARNING_DEVICE_ID"] = "1" + mocker.patch.object(settings, "openvino_precision", ModelPrecision.FP16) + + session = OrtSession(model_path, providers=["OpenVINOExecutionProvider"]) + + assert session.provider_options == [ + { + "device_type": "GPU.1", + "precision": "FP16", + "cache_dir": "/cache/ViT-B-32__openai/textual/openvino", + } + ] + def test_sets_provider_options_for_cuda(self) -> None: os.environ["MACHINE_LEARNING_DEVICE_ID"] = "1" @@ -417,7 +437,7 @@ class TestRknnSession: session.run(None, input_feed) rknn_session.return_value.put.assert_called_once_with([input1, input2]) - np_spy.call_count == 2 + assert np_spy.call_count == 2 np_spy.assert_has_calls([mock.call(input1), mock.call(input2)]) @@ -925,11 +945,34 @@ class TestCache: any_order=True, ) + async def test_preloads_ocr_models(self, monkeypatch: MonkeyPatch, mock_get_model: mock.Mock) -> None: + os.environ["MACHINE_LEARNING_PRELOAD__OCR__DETECTION"] = "PP-OCRv5_mobile" + os.environ["MACHINE_LEARNING_PRELOAD__OCR__RECOGNITION"] = "PP-OCRv5_mobile" + + settings = Settings() + assert settings.preload is not None + assert settings.preload.ocr.detection == "PP-OCRv5_mobile" + assert settings.preload.ocr.recognition == "PP-OCRv5_mobile" + + model_cache = ModelCache() + monkeypatch.setattr("immich_ml.main.model_cache", model_cache) + + await preload_models(settings.preload) + mock_get_model.assert_has_calls( + [ + mock.call("PP-OCRv5_mobile", ModelType.DETECTION, ModelTask.OCR), + mock.call("PP-OCRv5_mobile", ModelType.RECOGNITION, ModelTask.OCR), + ], + any_order=True, + ) + async def test_preloads_all_models(self, monkeypatch: MonkeyPatch, mock_get_model: mock.Mock) -> None: os.environ["MACHINE_LEARNING_PRELOAD__CLIP__TEXTUAL"] = "ViT-B-32__openai" os.environ["MACHINE_LEARNING_PRELOAD__CLIP__VISUAL"] = "ViT-B-32__openai" os.environ["MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION__RECOGNITION"] = "buffalo_s" os.environ["MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION__DETECTION"] = "buffalo_s" + os.environ["MACHINE_LEARNING_PRELOAD__OCR__DETECTION"] = "PP-OCRv5_mobile" + os.environ["MACHINE_LEARNING_PRELOAD__OCR__RECOGNITION"] = "PP-OCRv5_mobile" settings = Settings() assert settings.preload is not None @@ -937,6 +980,8 @@ class TestCache: assert settings.preload.clip.textual == "ViT-B-32__openai" assert settings.preload.facial_recognition.recognition == "buffalo_s" assert settings.preload.facial_recognition.detection == "buffalo_s" + assert settings.preload.ocr.detection == "PP-OCRv5_mobile" + assert settings.preload.ocr.recognition == "PP-OCRv5_mobile" model_cache = ModelCache() monkeypatch.setattr("immich_ml.main.model_cache", model_cache) @@ -948,6 +993,8 @@ class TestCache: mock.call("ViT-B-32__openai", ModelType.VISUAL, ModelTask.SEARCH), mock.call("buffalo_s", ModelType.DETECTION, ModelTask.FACIAL_RECOGNITION), mock.call("buffalo_s", ModelType.RECOGNITION, ModelTask.FACIAL_RECOGNITION), + mock.call("PP-OCRv5_mobile", ModelType.DETECTION, ModelTask.OCR), + mock.call("PP-OCRv5_mobile", ModelType.RECOGNITION, ModelTask.OCR), ], any_order=True, ) diff --git a/machine-learning/uv.lock b/machine-learning/uv.lock index caaa1e4467..919a17d45e 100644 --- a/machine-learning/uv.lock +++ b/machine-learning/uv.lock @@ -1100,7 +1100,6 @@ dependencies = [ { name = "python-multipart" }, { name = "rapidocr" }, { name = "rich" }, - { name = "setuptools" }, { name = "tokenizers" }, { name = "uvicorn", extra = ["standard"] }, ] @@ -1188,7 +1187,6 @@ requires-dist = [ { name = "rapidocr", specifier = ">=3.1.0" }, { name = "rich", specifier = ">=13.4.2" }, { name = "rknn-toolkit-lite2", marker = "extra == 'rknn'", specifier = ">=2.3.0,<3" }, - { name = "setuptools", specifier = ">=78.1.0" }, { name = "tokenizers", specifier = ">=0.15.0,<1.0" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.22.0,<1.0" }, ] diff --git a/misc/release/pump-version.sh b/misc/release/pump-version.sh index 65a2e70e50..d0db83b946 100755 --- a/misc/release/pump-version.sh +++ b/misc/release/pump-version.sh @@ -88,7 +88,6 @@ if [ "$CURRENT_MOBILE" != "$NEXT_MOBILE" ]; then fi sed -i "s/\"android\.injected\.version\.name\" => \"$CURRENT_SERVER\",/\"android\.injected\.version\.name\" => \"$NEXT_SERVER\",/" mobile/android/fastlane/Fastfile -sed -i "s/version_number: \"$CURRENT_SERVER\"$/version_number: \"$NEXT_SERVER\"/" mobile/ios/fastlane/Fastfile sed -i "s/\"android\.injected\.version\.code\" => $CURRENT_MOBILE,/\"android\.injected\.version\.code\" => $NEXT_MOBILE,/" mobile/android/fastlane/Fastfile sed -i "s/^version: $CURRENT_SERVER+$CURRENT_MOBILE$/version: $NEXT_SERVER+$NEXT_MOBILE/" mobile/pubspec.yaml diff --git a/mise.toml b/mise.toml index b4ccd76565..cf3b86c6cc 100644 --- a/mise.toml +++ b/mise.toml @@ -1,7 +1,9 @@ +experimental_monorepo_root = true + [tools] node = "24.11.0" flutter = "3.35.7" -pnpm = "10.19.0" +pnpm = "10.20.0" terragrunt = "0.91.2" opentofu = "1.10.6" @@ -14,514 +16,21 @@ postinstall = "chmod +x $MISE_TOOL_INSTALL_PATH/dcm" experimental = true pin = true -# .github -[tasks."github:install"] -run = "pnpm install --filter github --frozen-lockfile" - -[tasks."github:format"] -env._.path = "./.github/node_modules/.bin" -dir = ".github" -run = "prettier --check ." - -[tasks."github:format-fix"] -env._.path = "./.github/node_modules/.bin" -dir = ".github" -run = "prettier --write ." - -# @immich/cli -[tasks."cli:install"] -run = "pnpm install --filter @immich/cli --frozen-lockfile" - -[tasks."cli:build"] -env._.path = "./cli/node_modules/.bin" -dir = "cli" -run = "vite build" - -[tasks."cli:test"] -env._.path = "./cli/node_modules/.bin" -dir = "cli" -run = "vite" - -[tasks."cli:lint"] -env._.path = "./cli/node_modules/.bin" -dir = "cli" -run = "eslint \"src/**/*.ts\" --max-warnings 0" - -[tasks."cli:lint-fix"] -run = "mise run cli:lint --fix" - -[tasks."cli:format"] -env._.path = "./cli/node_modules/.bin" -dir = "cli" -run = "prettier --check ." - -[tasks."cli:format-fix"] -env._.path = "./cli/node_modules/.bin" -dir = "cli" -run = "prettier --write ." - -[tasks."cli:check"] -env._.path = "./cli/node_modules/.bin" -dir = "cli" -run = "tsc --noEmit" - -# @immich/sdk +# SDK tasks [tasks."sdk:install"] +dir = "open-api/typescript-sdk" run = "pnpm install --filter @immich/sdk --frozen-lockfile" [tasks."sdk:build"] -env._.path = "./open-api/typescript-sdk/node_modules/.bin" -dir = "./open-api/typescript-sdk" +dir = "open-api/typescript-sdk" +env._.path = "./node_modules/.bin" run = "tsc" -# docs -[tasks."docs:install"] -run = "pnpm install --filter documentation --frozen-lockfile" - -[tasks."docs:start"] -env._.path = "./docs/node_modules/.bin" -dir = "docs" -run = "docusaurus --port 3005" - -[tasks."docs:build"] -env._.path = "./docs/node_modules/.bin" -dir = "docs" -run = [ - "jq -c < ../open-api/immich-openapi-specs.json > ./static/openapi.json || exit 0", - "docusaurus build", -] - - -[tasks."docs:preview"] -env._.path = "./docs/node_modules/.bin" -dir = "docs" -run = "docusaurus serve" - - -[tasks."docs:format"] -env._.path = "./docs/node_modules/.bin" -dir = "docs" -run = "prettier --check ." - -[tasks."docs:format-fix"] -env._.path = "./docs/node_modules/.bin" -dir = "docs" -run = "prettier --write ." - - -# e2e -[tasks."e2e:install"] -run = "pnpm install --filter immich-e2e --frozen-lockfile" - -[tasks."e2e:test"] -env._.path = "./e2e/node_modules/.bin" -dir = "e2e" -run = "vitest --run" - -[tasks."e2e:test-web"] -env._.path = "./e2e/node_modules/.bin" -dir = "e2e" -run = "playwright test" - -[tasks."e2e:format"] -env._.path = "./e2e/node_modules/.bin" -dir = "e2e" -run = "prettier --check ." - -[tasks."e2e:format-fix"] -env._.path = "./e2e/node_modules/.bin" -dir = "e2e" -run = "prettier --write ." - -[tasks."e2e:lint"] -env._.path = "./e2e/node_modules/.bin" -dir = "e2e" -run = "eslint \"src/**/*.ts\" --max-warnings 0" - -[tasks."e2e:lint-fix"] -run = "mise run e2e:lint --fix" - -[tasks."e2e:check"] -env._.path = "./e2e/node_modules/.bin" -dir = "e2e" -run = "tsc --noEmit" - -# i18n +# i18n tasks [tasks."i18n:format"] -run = "mise run i18n:format-fix" +dir = "i18n" +run = { task = ":i18n:format-fix" } [tasks."i18n:format-fix"] -run = "pnpm dlx sort-json ./i18n/*.json" - - -# server -[tasks."server:install"] -run = "pnpm install --filter immich --frozen-lockfile" - -[tasks."server:build"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "nest build" - -[tasks."server:test"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "vitest --config test/vitest.config.mjs" - -[tasks."server:test-medium"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "vitest --config test/vitest.config.medium.mjs" - -[tasks."server:format"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "prettier --check ." - -[tasks."server:format-fix"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "prettier --write ." - -[tasks."server:lint"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "eslint \"src/**/*.ts\" \"test/**/*.ts\" --max-warnings 0" - -[tasks."server:lint-fix"] -run = "mise run server:lint --fix" - -[tasks."server:check"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "tsc --noEmit" - -[tasks."server:sql"] -dir = "server" -run = "node ./dist/bin/sync-open-api.js" - -[tasks."server:open-api"] -dir = "server" -run = "node ./dist/bin/sync-open-api.js" - -[tasks."server:migrations"] -dir = "server" -run = "node ./dist/bin/migrations.js" -description = "Run database migration commands (create, generate, run, debug, or query)" - -[tasks."server:schema-drop"] -run = "mise run server:migrations query 'DROP schema public cascade; CREATE schema public;'" - -[tasks."server:schema-reset"] -run = "mise run server:schema-drop && mise run server:migrations run" - -[tasks."server:email-dev"] -env._.path = "./server/node_modules/.bin" -dir = "server" -run = "email dev -p 3050 --dir src/emails" - -[tasks."server:checklist"] -run = [ - "mise run server:install", - "mise run server:format", - "mise run server:lint", - "mise run server:check", - "mise run server:test-medium --run", - "mise run server:test --run", -] - - -# web -[tasks."web:install"] -run = "pnpm install --filter immich-web --frozen-lockfile" - -[tasks."web:svelte-kit-sync"] -env._.path = "./web/node_modules/.bin" -dir = "web" -run = "svelte-kit sync" - -[tasks."web:build"] -env._.path = "./web/node_modules/.bin" -dir = "web" -run = "vite build" - -[tasks."web:build-stats"] -env.BUILD_STATS = "true" -env._.path = "./web/node_modules/.bin" -dir = "web" -run = "vite build" - -[tasks."web:preview"] -env._.path = "./web/node_modules/.bin" -dir = "web" -run = "vite preview" - -[tasks."web:start"] -env._.path = "web/node_modules/.bin" -dir = "web" -run = "vite dev --host 0.0.0.0 --port 3000" - -[tasks."web:test"] -depends = "web:svelte-kit-sync" -env._.path = "web/node_modules/.bin" -dir = "web" -run = "vitest" - -[tasks."web:format"] -env._.path = "web/node_modules/.bin" -dir = "web" -run = "prettier --check ." - -[tasks."web:format-fix"] -env._.path = "web/node_modules/.bin" -dir = "web" -run = "prettier --write ." - -[tasks."web:lint"] -env._.path = "web/node_modules/.bin" -dir = "web" -run = "eslint . --max-warnings 0 --concurrency 4" - -[tasks."web:lint-fix"] -run = "mise run web:lint --fix" - -[tasks."web:check"] -depends = "web:svelte-kit-sync" -env._.path = "web/node_modules/.bin" -dir = "web" -run = "tsc --noEmit" - -[tasks."web:check-svelte"] -depends = "web:svelte-kit-sync" -env._.path = "web/node_modules/.bin" -dir = "web" -run = "svelte-check --no-tsconfig --fail-on-warnings" - -[tasks."web:checklist"] -run = [ - "mise run web:install", - "mise run web:format", - "mise run web:check", - "mise run web:test --run", - "mise run web:lint", -] - - -# mobile -[tasks."mobile:codegen:dart"] -alias = "mobile:codegen" -description = "Execute build_runner to auto-generate dart code" -dir = "mobile" -sources = [ - "pubspec.yaml", - "build.yaml", - "lib/**/*.dart", - "infrastructure/**/*.drift", -] -outputs = { auto = true } -run = "dart run build_runner build --delete-conflicting-outputs" - -[tasks."mobile:codegen:pigeon"] -alias = "mobile:pigeon" -description = "Generate pigeon platform code" -dir = "mobile" -depends = [ - "mobile:pigeon:native-sync", - "mobile:pigeon:thumbnail", - "mobile:pigeon:background-worker", - "mobile:pigeon:background-worker-lock", - "mobile:pigeon:connectivity", -] - -[tasks."mobile:codegen:translation"] -alias = "mobile:translation" -description = "Generate translations from i18n JSONs" -dir = "mobile" -run = [ - { task = "i18n:format-fix" }, - { tasks = [ - "mobile:i18n:loader", - "mobile:i18n:keys", - ] }, -] - -[tasks."mobile:codegen:app-icon"] -description = "Generate app icons" -dir = "mobile" -run = "flutter pub run flutter_launcher_icons:main" - -[tasks."mobile:codegen:splash"] -description = "Generate splash screen" -dir = "mobile" -run = "flutter pub run flutter_native_splash:create" - -[tasks."mobile:test"] -description = "Run mobile tests" -dir = "mobile" -run = "flutter test" - -[tasks."mobile:lint"] -description = "Analyze Dart code" -dir = "mobile" -depends = ["mobile:analyze:dart", "mobile:analyze:dcm"] - -[tasks."mobile:lint-fix"] -description = "Auto-fix Dart code" -dir = "mobile" -depends = ["mobile:analyze:fix:dart", "mobile:analyze:fix:dcm"] - -[tasks."mobile:format"] -description = "Format Dart code" -dir = "mobile" -run = "dart format --set-exit-if-changed $(find lib -name '*.dart' -not \\( -name '*.g.dart' -o -name '*.drift.dart' -o -name '*.gr.dart' \\))" - -[tasks."mobile:build:android"] -description = "Build Android release" -dir = "mobile" -run = "flutter build appbundle" - -[tasks."mobile:drift:migration"] -alias = "mobile:migration" -description = "Generate database migrations" -dir = "mobile" -run = "dart run drift_dev make-migrations" - - -# mobile internal tasks -[tasks."mobile:pigeon:native-sync"] -description = "Generate native sync API pigeon code" -dir = "mobile" -hide = true -sources = ["pigeon/native_sync_api.dart"] -outputs = [ - "lib/platform/native_sync_api.g.dart", - "ios/Runner/Sync/Messages.g.swift", - "android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt", -] -run = [ - "dart run pigeon --input pigeon/native_sync_api.dart", - "dart format lib/platform/native_sync_api.g.dart", -] - -[tasks."mobile:pigeon:thumbnail"] -description = "Generate thumbnail API pigeon code" -dir = "mobile" -hide = true -sources = ["pigeon/thumbnail_api.dart"] -outputs = [ - "lib/platform/thumbnail_api.g.dart", - "ios/Runner/Images/Thumbnails.g.swift", - "android/app/src/main/kotlin/app/alextran/immich/images/Thumbnails.g.kt", -] -run = [ - "dart run pigeon --input pigeon/thumbnail_api.dart", - "dart format lib/platform/thumbnail_api.g.dart", -] - -[tasks."mobile:pigeon:background-worker"] -description = "Generate background worker API pigeon code" -dir = "mobile" -hide = true -sources = ["pigeon/background_worker_api.dart"] -outputs = [ - "lib/platform/background_worker_api.g.dart", - "ios/Runner/Background/BackgroundWorker.g.swift", - "android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt", -] -run = [ - "dart run pigeon --input pigeon/background_worker_api.dart", - "dart format lib/platform/background_worker_api.g.dart", -] - -[tasks."mobile:pigeon:background-worker-lock"] -description = "Generate background worker lock API pigeon code" -dir = "mobile" -hide = true -sources = ["pigeon/background_worker_lock_api.dart"] -outputs = [ - "lib/platform/background_worker_lock_api.g.dart", - "android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt", -] -run = [ - "dart run pigeon --input pigeon/background_worker_lock_api.dart", - "dart format lib/platform/background_worker_lock_api.g.dart", -] - -[tasks."mobile:pigeon:connectivity"] -description = "Generate connectivity API pigeon code" -dir = "mobile" -hide = true -sources = ["pigeon/connectivity_api.dart"] -outputs = [ - "lib/platform/connectivity_api.g.dart", - "ios/Runner/Connectivity/Connectivity.g.swift", - "android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt", -] -run = [ - "dart run pigeon --input pigeon/connectivity_api.dart", - "dart format lib/platform/connectivity_api.g.dart", -] - -[tasks."mobile:i18n:loader"] -description = "Generate i18n loader" -dir = "mobile" -hide = true -sources = ["i18n/"] -outputs = "lib/generated/codegen_loader.g.dart" -run = [ - "dart run easy_localization:generate -S ../i18n", - "dart format lib/generated/codegen_loader.g.dart", -] - -[tasks."mobile:i18n:keys"] -description = "Generate i18n keys" -dir = "mobile" -hide = true -sources = ["i18n/en.json"] -outputs = "lib/generated/intl_keys.g.dart" -run = [ - "dart run bin/generate_keys.dart", - "dart format lib/generated/intl_keys.g.dart", -] - -[tasks."mobile:analyze:dart"] -description = "Run Dart analysis" -dir = "mobile" -hide = true -run = "dart analyze --fatal-infos" - -[tasks."mobile:analyze:dcm"] -description = "Run Dart Code Metrics" -dir = "mobile" -hide = true -run = "dcm analyze lib --fatal-style --fatal-warnings" - -[tasks."mobile:analyze:fix:dart"] -description = "Auto-fix Dart analysis" -dir = "mobile" -hide = true -run = "dart fix --apply" - -[tasks."mobile:analyze:fix:dcm"] -description = "Auto-fix Dart Code Metrics" -dir = "mobile" -hide = true -run = "dcm fix lib" - -# docs deployment -[tasks."tg:fmt"] -run = "terragrunt hclfmt" -description = "Format terragrunt files" - -[tasks.tf] -run = "terragrunt run --all" -description = "Wrapper for terragrunt run-all" -dir = "{{cwd}}" - -[tasks."tf:fmt"] -run = "tofu fmt -recursive tf/" -description = "Format terraform files" - -[tasks."tf:init"] -run = "mise run tf init -- -reconfigure" -dir = "{{cwd}}" +dir = "i18n" +run = "pnpm dlx sort-json *.json" diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/BackgroundServicePlugin.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/BackgroundServicePlugin.kt index ae2ec22a71..f62f25558d 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/BackgroundServicePlugin.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/BackgroundServicePlugin.kt @@ -143,7 +143,7 @@ class BackgroundServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler, val mediaUrls = call.argument>("mediaUrls") if (mediaUrls != null) { if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) && hasManageMediaPermission()) { - moveToTrash(mediaUrls, result) + moveToTrash(mediaUrls, result) } else { result.error("PERMISSION_DENIED", "Media permission required", null) } @@ -155,15 +155,23 @@ class BackgroundServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler, "restoreFromTrash" -> { val fileName = call.argument("fileName") val type = call.argument("type") + val mediaId = call.argument("mediaId") if (fileName != null && type != null) { if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) && hasManageMediaPermission()) { restoreFromTrash(fileName, type, result) } else { result.error("PERMISSION_DENIED", "Media permission required", null) } - } else { - result.error("INVALID_NAME", "The file name is not specified.", null) - } + } else + if (mediaId != null && type != null) { + if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) && hasManageMediaPermission()) { + restoreFromTrashById(mediaId, type, result) + } else { + result.error("PERMISSION_DENIED", "Media permission required", null) + } + } else { + result.error("INVALID_PARAMS", "Required params are not specified.", null) + } } "requestManageMediaPermission" -> { @@ -175,6 +183,17 @@ class BackgroundServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler, } } + "hasManageMediaPermission" -> { + if (hasManageMediaPermission()) { + Log.i("Manage storage permission", "Permission already granted") + result.success(true) + } else { + result.success(false) + } + } + + "manageMediaPermission" -> requestManageMediaPermission(result) + else -> result.notImplemented() } } @@ -224,25 +243,47 @@ class BackgroundServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler, } @RequiresApi(Build.VERSION_CODES.R) - private fun toggleTrash(contentUris: List, isTrashed: Boolean, result: Result) { - val activity = activityBinding?.activity - val contentResolver = context?.contentResolver - if (activity == null || contentResolver == null) { - result.error("TrashError", "Activity or ContentResolver not available", null) - return - } + private fun restoreFromTrashById(mediaId: String, type: Int, result: Result) { + val id = mediaId.toLongOrNull() + if (id == null) { + result.error("INVALID_ID", "The file id is not a valid number: $mediaId", null) + return + } + if (!isInTrash(id)) { + result.error("TrashNotFound", "Item with id=$id not found in trash", null) + return + } - try { - val pendingIntent = MediaStore.createTrashRequest(contentResolver, contentUris, isTrashed) - pendingResult = result // Store for onActivityResult - activity.startIntentSenderForResult( - pendingIntent.intentSender, - trashRequestCode, - null, 0, 0, 0 - ) - } catch (e: Exception) { - Log.e("TrashError", "Error creating or starting trash request", e) - result.error("TrashError", "Error creating or starting trash request", null) + val uri = ContentUris.withAppendedId(contentUriForType(type), id) + + try { + Log.i(TAG, "restoreFromTrashById: uri=$uri (type=$type,id=$id)") + restoreUris(listOf(uri), result) + } catch (e: Exception) { + Log.w(TAG, "restoreFromTrashById failed", e) + } + } + + @RequiresApi(Build.VERSION_CODES.R) + private fun toggleTrash(contentUris: List, isTrashed: Boolean, result: Result) { + val activity = activityBinding?.activity + val contentResolver = context?.contentResolver + if (activity == null || contentResolver == null) { + result.error("TrashError", "Activity or ContentResolver not available", null) + return + } + + try { + val pendingIntent = MediaStore.createTrashRequest(contentResolver, contentUris, isTrashed) + pendingResult = result // Store for onActivityResult + activity.startIntentSenderForResult( + pendingIntent.intentSender, + trashRequestCode, + null, 0, 0, 0 + ) + } catch (e: Exception) { + Log.e("TrashError", "Error creating or starting trash request", e) + result.error("TrashError", "Error creating or starting trash request", null) } } @@ -264,14 +305,7 @@ class BackgroundServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler, contentResolver.query(queryUri, projection, queryArgs, null)?.use { cursor -> if (cursor.moveToFirst()) { val id = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Files.FileColumns._ID)) - // same order as AssetType from dart - val contentUri = when (type) { - 1 -> MediaStore.Images.Media.EXTERNAL_CONTENT_URI - 2 -> MediaStore.Video.Media.EXTERNAL_CONTENT_URI - 3 -> MediaStore.Audio.Media.EXTERNAL_CONTENT_URI - else -> queryUri - } - return ContentUris.withAppendedId(contentUri, id) + return ContentUris.withAppendedId(contentUriForType(type), id) } } return null @@ -315,6 +349,40 @@ class BackgroundServicePlugin : FlutterPlugin, MethodChannel.MethodCallHandler, } return false } + + @RequiresApi(Build.VERSION_CODES.R) + private fun isInTrash(id: Long): Boolean { + val contentResolver = context?.contentResolver ?: return false + val filesUri = MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL) + val args = Bundle().apply { + putString(ContentResolver.QUERY_ARG_SQL_SELECTION, "${MediaStore.Files.FileColumns._ID}=?") + putStringArray(ContentResolver.QUERY_ARG_SQL_SELECTION_ARGS, arrayOf(id.toString())) + putInt(MediaStore.QUERY_ARG_MATCH_TRASHED, MediaStore.MATCH_ONLY) + putInt(ContentResolver.QUERY_ARG_LIMIT, 1) + } + return contentResolver.query(filesUri, arrayOf(MediaStore.Files.FileColumns._ID), args, null) + ?.use { it.moveToFirst() } == true + } + + @RequiresApi(Build.VERSION_CODES.R) + private fun restoreUris(uris: List, result: Result) { + if (uris.isEmpty()) { + result.error("TrashError", "No URIs to restore", null) + return + } + Log.i(TAG, "restoreUris: count=${uris.size}, first=${uris.first()}") + toggleTrash(uris, false, result) + } + + @RequiresApi(Build.VERSION_CODES.Q) + private fun contentUriForType(type: Int): Uri = + when (type) { + // same order as AssetType from dart + 1 -> MediaStore.Images.Media.EXTERNAL_CONTENT_URI + 2 -> MediaStore.Video.Media.EXTERNAL_CONTENT_URI + 3 -> MediaStore.Audio.Media.EXTERNAL_CONTENT_URI + else -> MediaStore.Files.getContentUri(MediaStore.VOLUME_EXTERNAL) + } } private const val TAG = "BackgroundServicePlugin" diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt index 08ff0e821a..e6cf92f573 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt @@ -305,6 +305,7 @@ interface NativeSyncApi { fun getAssetsForAlbum(albumId: String, updatedTimeCond: Long?): List fun hashAssets(assetIds: List, allowNetworkAccess: Boolean, callback: (Result>) -> Unit) fun cancelHashing() + fun getTrashedAssets(): Map> companion object { /** The codec used by NativeSyncApi. */ @@ -483,6 +484,21 @@ interface NativeSyncApi { channel.setMessageHandler(null) } } + run { + val channel = BasicMessageChannel(binaryMessenger, "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$separatedMessageChannelSuffix", codec, taskQueue) + if (api != null) { + channel.setMessageHandler { _, reply -> + val wrapped: List = try { + listOf(api.getTrashedAssets()) + } catch (exception: Throwable) { + MessagesPigeonUtils.wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } } } } diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl26.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl26.kt index 5deacc30db..6d2c35d78f 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl26.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl26.kt @@ -21,4 +21,9 @@ class NativeSyncApiImpl26(context: Context) : NativeSyncApiImplBase(context), Na override fun getMediaChanges(): SyncDelta { throw IllegalStateException("Method not supported on this Android version.") } + + override fun getTrashedAssets(): Map> { + //Method not supported on this Android version. + return emptyMap() + } } diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl30.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl30.kt index 052032e143..ca54c9f823 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl30.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImpl30.kt @@ -1,7 +1,9 @@ package app.alextran.immich.sync +import android.content.ContentResolver import android.content.Context import android.os.Build +import android.os.Bundle import android.provider.MediaStore import androidx.annotation.RequiresApi import androidx.annotation.RequiresExtension @@ -86,4 +88,29 @@ class NativeSyncApiImpl30(context: Context) : NativeSyncApiImplBase(context), Na // Unmounted volumes are handled in dart when the album is removed return SyncDelta(hasChanges, changed, deleted, assetAlbums) } + + override fun getTrashedAssets(): Map> { + + val result = LinkedHashMap>() + val volumes = MediaStore.getExternalVolumeNames(ctx) + + for (volume in volumes) { + + val queryArgs = Bundle().apply { + putString(ContentResolver.QUERY_ARG_SQL_SELECTION, MEDIA_SELECTION) + putStringArray(ContentResolver.QUERY_ARG_SQL_SELECTION_ARGS, MEDIA_SELECTION_ARGS) + putInt(MediaStore.QUERY_ARG_MATCH_TRASHED, MediaStore.MATCH_ONLY) + } + + getCursor(volume, queryArgs).use { cursor -> + getAssets(cursor).forEach { res -> + if (res is AssetResult.ValidAsset) { + result.getOrPut(res.albumId) { mutableListOf() }.add(res.asset) + } + } + } + } + + return result.mapValues { it.value.toList() } + } } diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt index ca2781f7b4..b1e9dd7d44 100644 --- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt +++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt @@ -4,6 +4,8 @@ import android.annotation.SuppressLint import android.content.ContentUris import android.content.Context import android.database.Cursor +import android.net.Uri +import android.os.Bundle import android.provider.MediaStore import android.util.Base64 import androidx.core.database.getStringOrNull @@ -81,6 +83,16 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin() { sortOrder, ) + protected fun getCursor( + volume: String, + queryArgs: Bundle + ): Cursor? = ctx.contentResolver.query( + MediaStore.Files.getContentUri(volume), + ASSET_PROJECTION, + queryArgs, + null + ) + protected fun getAssets(cursor: Cursor?): Sequence { return sequence { cursor?.use { c -> diff --git a/mobile/android/fastlane/Fastfile b/mobile/android/fastlane/Fastfile index 5bcd30589b..6b9ce07465 100644 --- a/mobile/android/fastlane/Fastfile +++ b/mobile/android/fastlane/Fastfile @@ -35,8 +35,8 @@ platform :android do task: 'bundle', build_type: 'Release', properties: { - "android.injected.version.code" => 3023, - "android.injected.version.name" => "2.2.0", + "android.injected.version.code" => 3026, + "android.injected.version.name" => "2.2.3", } ) upload_to_play_store(skip_upload_apk: true, skip_upload_images: true, skip_upload_screenshots: true, aab: '../build/app/outputs/bundle/release/app-release.aab') diff --git a/mobile/drift_schemas/main/drift_schema_v13.json b/mobile/drift_schemas/main/drift_schema_v13.json new file mode 100644 index 0000000000..e527e8d78a --- /dev/null +++ b/mobile/drift_schemas/main/drift_schema_v13.json @@ -0,0 +1 @@ +{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":true},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"user_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"email","getter_name":"email","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"has_profile_image","getter_name":"hasProfileImage","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"has_profile_image\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"has_profile_image\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"profile_changed_at","getter_name":"profileChangedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"avatar_color","getter_name":"avatarColor","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AvatarColor.values)","dart_type_name":"AvatarColor"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":1,"references":[0],"type":"table","data":{"name":"remote_asset_entity","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AssetType.values)","dart_type_name":"AssetType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"duration_in_seconds","getter_name":"durationInSeconds","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"checksum","getter_name":"checksum","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_favorite","getter_name":"isFavorite","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_favorite\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_favorite\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"local_date_time","getter_name":"localDateTime","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"thumb_hash","getter_name":"thumbHash","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"deleted_at","getter_name":"deletedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"live_photo_video_id","getter_name":"livePhotoVideoId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"visibility","getter_name":"visibility","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AssetVisibility.values)","dart_type_name":"AssetVisibility"}},{"name":"stack_id","getter_name":"stackId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"library_id","getter_name":"libraryId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":2,"references":[0],"type":"table","data":{"name":"stack_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"primary_asset_id","getter_name":"primaryAssetId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":3,"references":[],"type":"table","data":{"name":"local_asset_entity","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AssetType.values)","dart_type_name":"AssetType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"duration_in_seconds","getter_name":"durationInSeconds","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"checksum","getter_name":"checksum","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_favorite","getter_name":"isFavorite","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_favorite\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_favorite\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"orientation","getter_name":"orientation","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":4,"references":[0,1],"type":"table","data":{"name":"remote_album_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"description","getter_name":"description","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('\\'\\'')","default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"thumbnail_asset_id","getter_name":"thumbnailAssetId","moor_type":"string","nullable":true,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE SET NULL","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE SET NULL"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"is_activity_enabled","getter_name":"isActivityEnabled","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_activity_enabled\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_activity_enabled\" IN (0, 1))"},"default_dart":"const CustomExpression('1')","default_client_dart":null,"dsl_features":[]},{"name":"order","getter_name":"order","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AlbumAssetOrder.values)","dart_type_name":"AlbumAssetOrder"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":5,"references":[4],"type":"table","data":{"name":"local_album_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"backup_selection","getter_name":"backupSelection","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(BackupSelection.values)","dart_type_name":"BackupSelection"}},{"name":"is_ios_shared_album","getter_name":"isIosSharedAlbum","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_ios_shared_album\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_ios_shared_album\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"linked_remote_album_id","getter_name":"linkedRemoteAlbumId","moor_type":"string","nullable":true,"customConstraints":null,"defaultConstraints":"REFERENCES remote_album_entity (id) ON DELETE SET NULL","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_album_entity (id) ON DELETE SET NULL"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"marker","getter_name":"marker_","moor_type":"bool","nullable":true,"customConstraints":null,"defaultConstraints":"CHECK (\"marker\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"marker\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":6,"references":[3,5],"type":"table","data":{"name":"local_album_asset_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES local_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES local_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES local_album_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES local_album_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"marker","getter_name":"marker_","moor_type":"bool","nullable":true,"customConstraints":null,"defaultConstraints":"CHECK (\"marker\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"marker\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id","album_id"]}},{"id":7,"references":[3],"type":"index","data":{"on":3,"name":"idx_local_asset_checksum","sql":"CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)","unique":false,"columns":[]}},{"id":8,"references":[1],"type":"index","data":{"on":1,"name":"idx_remote_asset_owner_checksum","sql":"CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)","unique":false,"columns":[]}},{"id":9,"references":[1],"type":"index","data":{"on":1,"name":"UQ_remote_assets_owner_checksum","sql":"CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum\nON remote_asset_entity (owner_id, checksum)\nWHERE (library_id IS NULL);\n","unique":true,"columns":[]}},{"id":10,"references":[1],"type":"index","data":{"on":1,"name":"UQ_remote_assets_owner_library_checksum","sql":"CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum\nON remote_asset_entity (owner_id, library_id, checksum)\nWHERE (library_id IS NOT NULL);\n","unique":true,"columns":[]}},{"id":11,"references":[1],"type":"index","data":{"on":1,"name":"idx_remote_asset_checksum","sql":"CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)","unique":false,"columns":[]}},{"id":12,"references":[],"type":"table","data":{"name":"auth_user_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"email","getter_name":"email","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_admin","getter_name":"isAdmin","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_admin\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_admin\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"has_profile_image","getter_name":"hasProfileImage","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"has_profile_image\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"has_profile_image\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"profile_changed_at","getter_name":"profileChangedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"avatar_color","getter_name":"avatarColor","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AvatarColor.values)","dart_type_name":"AvatarColor"}},{"name":"quota_size_in_bytes","getter_name":"quotaSizeInBytes","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"quota_usage_in_bytes","getter_name":"quotaUsageInBytes","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"pin_code","getter_name":"pinCode","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":13,"references":[0],"type":"table","data":{"name":"user_metadata_entity","was_declared_in_moor":false,"columns":[{"name":"user_id","getter_name":"userId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"key","getter_name":"key","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(UserMetadataKey.values)","dart_type_name":"UserMetadataKey"}},{"name":"value","getter_name":"value","moor_type":"blob","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"userMetadataConverter","dart_type_name":"Map"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["user_id","key"]}},{"id":14,"references":[0],"type":"table","data":{"name":"partner_entity","was_declared_in_moor":false,"columns":[{"name":"shared_by_id","getter_name":"sharedById","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"shared_with_id","getter_name":"sharedWithId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"in_timeline","getter_name":"inTimeline","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"in_timeline\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"in_timeline\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["shared_by_id","shared_with_id"]}},{"id":15,"references":[1],"type":"table","data":{"name":"remote_exif_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"city","getter_name":"city","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"state","getter_name":"state","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"country","getter_name":"country","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"date_time_original","getter_name":"dateTimeOriginal","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"description","getter_name":"description","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"exposure_time","getter_name":"exposureTime","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"f_number","getter_name":"fNumber","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"file_size","getter_name":"fileSize","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"focal_length","getter_name":"focalLength","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"latitude","getter_name":"latitude","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"longitude","getter_name":"longitude","moor_type":"double","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"iso","getter_name":"iso","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"make","getter_name":"make","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"model","getter_name":"model","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"lens","getter_name":"lens","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"orientation","getter_name":"orientation","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"time_zone","getter_name":"timeZone","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"rating","getter_name":"rating","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"projection_type","getter_name":"projectionType","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id"]}},{"id":16,"references":[1,4],"type":"table","data":{"name":"remote_album_asset_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_album_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_album_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id","album_id"]}},{"id":17,"references":[4,0],"type":"table","data":{"name":"remote_album_user_entity","was_declared_in_moor":false,"columns":[{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_album_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_album_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"user_id","getter_name":"userId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"role","getter_name":"role","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AlbumUserRole.values)","dart_type_name":"AlbumUserRole"}}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["album_id","user_id"]}},{"id":18,"references":[0],"type":"table","data":{"name":"memory_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"deleted_at","getter_name":"deletedAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(MemoryTypeEnum.values)","dart_type_name":"MemoryTypeEnum"}},{"name":"data","getter_name":"data","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_saved","getter_name":"isSaved","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_saved\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_saved\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"memory_at","getter_name":"memoryAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"seen_at","getter_name":"seenAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"show_at","getter_name":"showAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"hide_at","getter_name":"hideAt","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":19,"references":[1,18],"type":"table","data":{"name":"memory_asset_entity","was_declared_in_moor":false,"columns":[{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"memory_id","getter_name":"memoryId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES memory_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES memory_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["asset_id","memory_id"]}},{"id":20,"references":[0],"type":"table","data":{"name":"person_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"owner_id","getter_name":"ownerId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES user_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES user_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"face_asset_id","getter_name":"faceAssetId","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_favorite","getter_name":"isFavorite","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_favorite\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_favorite\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_hidden","getter_name":"isHidden","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_hidden\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_hidden\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"color","getter_name":"color","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"birth_date","getter_name":"birthDate","moor_type":"dateTime","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":21,"references":[1,20],"type":"table","data":{"name":"asset_face_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"asset_id","getter_name":"assetId","moor_type":"string","nullable":false,"customConstraints":null,"defaultConstraints":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES remote_asset_entity (id) ON DELETE CASCADE"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"person_id","getter_name":"personId","moor_type":"string","nullable":true,"customConstraints":null,"defaultConstraints":"REFERENCES person_entity (id) ON DELETE SET NULL","dialectAwareDefaultConstraints":{"sqlite":"REFERENCES person_entity (id) ON DELETE SET NULL"},"default_dart":null,"default_client_dart":null,"dsl_features":["unknown"]},{"name":"image_width","getter_name":"imageWidth","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"image_height","getter_name":"imageHeight","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bounding_box_x1","getter_name":"boundingBoxX1","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bounding_box_y1","getter_name":"boundingBoxY1","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bounding_box_x2","getter_name":"boundingBoxX2","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"bounding_box_y2","getter_name":"boundingBoxY2","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"source_type","getter_name":"sourceType","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":22,"references":[],"type":"table","data":{"name":"store_entity","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"string_value","getter_name":"stringValue","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"int_value","getter_name":"intValue","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id"]}},{"id":23,"references":[],"type":"table","data":{"name":"trashed_local_asset_entity","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"type","getter_name":"type","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumIndexConverter(AssetType.values)","dart_type_name":"AssetType"}},{"name":"created_at","getter_name":"createdAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"updated_at","getter_name":"updatedAt","moor_type":"dateTime","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('CURRENT_TIMESTAMP')","default_client_dart":null,"dsl_features":[]},{"name":"width","getter_name":"width","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"height","getter_name":"height","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"duration_in_seconds","getter_name":"durationInSeconds","moor_type":"int","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"id","getter_name":"id","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"album_id","getter_name":"albumId","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"checksum","getter_name":"checksum","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"is_favorite","getter_name":"isFavorite","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"is_favorite\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"is_favorite\" IN (0, 1))"},"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]},{"name":"orientation","getter_name":"orientation","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":"const CustomExpression('0')","default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":true,"constraints":[],"strict":true,"explicit_pk":["id","album_id"]}},{"id":24,"references":[15],"type":"index","data":{"on":15,"name":"idx_lat_lng","sql":"CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)","unique":false,"columns":[]}},{"id":25,"references":[23],"type":"index","data":{"on":23,"name":"idx_trashed_local_asset_checksum","sql":"CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)","unique":false,"columns":[]}},{"id":26,"references":[23],"type":"index","data":{"on":23,"name":"idx_trashed_local_asset_album","sql":"CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)","unique":false,"columns":[]}}]} \ No newline at end of file diff --git a/mobile/ios/Gemfile b/mobile/ios/Gemfile index bb94aef518..3b6771ad35 100644 --- a/mobile/ios/Gemfile +++ b/mobile/ios/Gemfile @@ -1,4 +1,5 @@ source "https://rubygems.org" gem "fastlane" -gem "cocoapods" \ No newline at end of file +gem "cocoapods" +gem "abbrev" # Required for Ruby 3.4+ \ No newline at end of file diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj index 3f00b6c6aa..599e7990f4 100644 --- a/mobile/ios/Runner.xcodeproj/project.pbxproj +++ b/mobile/ios/Runner.xcodeproj/project.pbxproj @@ -32,6 +32,9 @@ FEAFA8732E4D42F4001E47FE /* Thumbhash.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEAFA8722E4D42F4001E47FE /* Thumbhash.swift */; }; FED3B1962E253E9B0030FD97 /* ThumbnailsImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED3B1942E253E9B0030FD97 /* ThumbnailsImpl.swift */; }; FED3B1972E253E9B0030FD97 /* Thumbnails.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED3B1932E253E9B0030FD97 /* Thumbnails.g.swift */; }; + FEE084F82EC172460045228E /* SQLiteData in Frameworks */ = {isa = PBXBuildFile; productRef = FEE084F72EC172460045228E /* SQLiteData */; }; + FEE084FB2EC1725A0045228E /* RawStructuredFieldValues in Frameworks */ = {isa = PBXBuildFile; productRef = FEE084FA2EC1725A0045228E /* RawStructuredFieldValues */; }; + FEE084FD2EC1725A0045228E /* StructuredFieldValues in Frameworks */ = {isa = PBXBuildFile; productRef = FEE084FC2EC1725A0045228E /* StructuredFieldValues */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -153,6 +156,13 @@ path = WidgetExtension; sourceTree = ""; }; + FEE084F22EC172080045228E /* Schemas */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + ); + path = Schemas; + sourceTree = ""; + }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -160,6 +170,9 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + FEE084F82EC172460045228E /* SQLiteData in Frameworks */, + FEE084FB2EC1725A0045228E /* RawStructuredFieldValues in Frameworks */, + FEE084FD2EC1725A0045228E /* StructuredFieldValues in Frameworks */, D218389C4A4C4693F141F7D1 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -254,6 +267,7 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( + FEE084F22EC172080045228E /* Schemas */, B231F52D2E93A44A00BC45D1 /* Core */, B25D37792E72CA15008B6CA7 /* Connectivity */, B21E34A62E5AF9760031FDB9 /* Background */, @@ -341,6 +355,7 @@ fileSystemSynchronizedGroups = ( B231F52D2E93A44A00BC45D1 /* Core */, B2CF7F8C2DDE4EBB00744BF6 /* Sync */, + FEE084F22EC172080045228E /* Schemas */, ); name = Runner; productName = Runner; @@ -419,6 +434,10 @@ Base, ); mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + FEE084F62EC172460045228E /* XCRemoteSwiftPackageReference "sqlite-data" */, + FEE084F92EC1725A0045228E /* XCRemoteSwiftPackageReference "swift-http-structured-headers" */, + ); preferredProjectObjectVersion = 77; productRefGroup = 97C146EF1CF9000F007C117D /* Products */; projectDirPath = ""; @@ -714,7 +733,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; CUSTOM_GROUP_ID = group.app.immich.share; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_BITCODE = NO; @@ -858,7 +877,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; CUSTOM_GROUP_ID = group.app.immich.share; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_BITCODE = NO; @@ -888,7 +907,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; CUSTOM_GROUP_ID = group.app.immich.share; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_BITCODE = NO; @@ -922,7 +941,7 @@ CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -965,7 +984,7 @@ CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -1005,7 +1024,7 @@ CODE_SIGN_ENTITLEMENTS = WidgetExtension/WidgetExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu17; @@ -1044,7 +1063,7 @@ CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; CUSTOM_GROUP_ID = group.app.immich.share; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -1088,7 +1107,7 @@ CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; CUSTOM_GROUP_ID = group.app.immich.share; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -1129,7 +1148,7 @@ CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 231; + CURRENT_PROJECT_VERSION = 233; CUSTOM_GROUP_ID = group.app.immich.share; DEVELOPMENT_TEAM = 2F67MQ8R79; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -1201,6 +1220,43 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + FEE084F62EC172460045228E /* XCRemoteSwiftPackageReference "sqlite-data" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/pointfreeco/sqlite-data"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.3.0; + }; + }; + FEE084F92EC1725A0045228E /* XCRemoteSwiftPackageReference "swift-http-structured-headers" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/apple/swift-http-structured-headers.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.5.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + FEE084F72EC172460045228E /* SQLiteData */ = { + isa = XCSwiftPackageProductDependency; + package = FEE084F62EC172460045228E /* XCRemoteSwiftPackageReference "sqlite-data" */; + productName = SQLiteData; + }; + FEE084FA2EC1725A0045228E /* RawStructuredFieldValues */ = { + isa = XCSwiftPackageProductDependency; + package = FEE084F92EC1725A0045228E /* XCRemoteSwiftPackageReference "swift-http-structured-headers" */; + productName = RawStructuredFieldValues; + }; + FEE084FC2EC1725A0045228E /* StructuredFieldValues */ = { + isa = XCSwiftPackageProductDependency; + package = FEE084F92EC1725A0045228E /* XCRemoteSwiftPackageReference "swift-http-structured-headers" */; + productName = StructuredFieldValues; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 97C146E61CF9000F007C117D /* Project object */; } diff --git a/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000000..432e81234d --- /dev/null +++ b/mobile/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,177 @@ +{ + "originHash" : "9be33bfaa68721646604aefff3cabbdaf9a193da192aae024c265065671f6c49", + "pins" : [ + { + "identity" : "combine-schedulers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/combine-schedulers", + "state" : { + "revision" : "fd16d76fd8b9a976d88bfb6cacc05ca8d19c91b6", + "version" : "1.1.0" + } + }, + { + "identity" : "grdb.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/groue/GRDB.swift", + "state" : { + "revision" : "18497b68fdbb3a09528d260a0a0e1e7e61c8c53d", + "version" : "7.8.0" + } + }, + { + "identity" : "opencombine", + "kind" : "remoteSourceControl", + "location" : "https://github.com/OpenCombine/OpenCombine.git", + "state" : { + "revision" : "8576f0d579b27020beccbccc3ea6844f3ddfc2c2", + "version" : "0.14.0" + } + }, + { + "identity" : "sqlite-data", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/sqlite-data", + "state" : { + "revision" : "b66b894b9a5710f1072c8eb6448a7edfc2d743d9", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-case-paths", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-case-paths", + "state" : { + "revision" : "6989976265be3f8d2b5802c722f9ba168e227c71", + "version" : "1.7.2" + } + }, + { + "identity" : "swift-clocks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-clocks", + "state" : { + "revision" : "cc46202b53476d64e824e0b6612da09d84ffde8e", + "version" : "1.0.6" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections", + "state" : { + "revision" : "7b847a3b7008b2dc2f47ca3110d8c782fb2e5c7e", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-concurrency-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-concurrency-extras", + "state" : { + "revision" : "5a3825302b1a0d744183200915a47b508c828e6f", + "version" : "1.3.2" + } + }, + { + "identity" : "swift-custom-dump", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-custom-dump", + "state" : { + "revision" : "82645ec760917961cfa08c9c0c7104a57a0fa4b1", + "version" : "1.3.3" + } + }, + { + "identity" : "swift-dependencies", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-dependencies", + "state" : { + "revision" : "a10f9feeb214bc72b5337b6ef6d5a029360db4cc", + "version" : "1.10.0" + } + }, + { + "identity" : "swift-http-structured-headers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-http-structured-headers.git", + "state" : { + "revision" : "a9f3c352f4d46afd155e00b3c6e85decae6bcbeb", + "version" : "1.5.0" + } + }, + { + "identity" : "swift-identified-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-identified-collections", + "state" : { + "revision" : "322d9ffeeba85c9f7c4984b39422ec7cc3c56597", + "version" : "1.1.1" + } + }, + { + "identity" : "swift-perception", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-perception", + "state" : { + "revision" : "4f47ebafed5f0b0172cf5c661454fa8e28fb2ac4", + "version" : "2.0.9" + } + }, + { + "identity" : "swift-sharing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-sharing", + "state" : { + "revision" : "3bfc408cc2d0bee2287c174da6b1c76768377818", + "version" : "2.7.4" + } + }, + { + "identity" : "swift-snapshot-testing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing", + "state" : { + "revision" : "a8b7c5e0ed33d8ab8887d1654d9b59f2cbad529b", + "version" : "1.18.7" + } + }, + { + "identity" : "swift-structured-queries", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-structured-queries", + "state" : { + "revision" : "9c84335373bae5f5c9f7b5f0adf3ae10f2cab5b9", + "version" : "0.25.2" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-syntax", + "state" : { + "revision" : "4799286537280063c85a32f09884cfbca301b1a1", + "version" : "602.0.0" + } + }, + { + "identity" : "swift-tagged", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-tagged", + "state" : { + "revision" : "3907a9438f5b57d317001dc99f3f11b46882272b", + "version" : "0.10.0" + } + }, + { + "identity" : "xctest-dynamic-overlay", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state" : { + "revision" : "4c27acf5394b645b70d8ba19dc249c0472d5f618", + "version" : "1.7.0" + } + } + ], + "version" : 3 +} diff --git a/mobile/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved b/mobile/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000000..ff8a53ff4b --- /dev/null +++ b/mobile/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,168 @@ +{ + "originHash" : "9be33bfaa68721646604aefff3cabbdaf9a193da192aae024c265065671f6c49", + "pins" : [ + { + "identity" : "combine-schedulers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/combine-schedulers", + "state" : { + "revision" : "5928286acce13def418ec36d05a001a9641086f2", + "version" : "1.0.3" + } + }, + { + "identity" : "grdb.swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/groue/GRDB.swift", + "state" : { + "revision" : "18497b68fdbb3a09528d260a0a0e1e7e61c8c53d", + "version" : "7.8.0" + } + }, + { + "identity" : "sqlite-data", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/sqlite-data", + "state" : { + "revision" : "b66b894b9a5710f1072c8eb6448a7edfc2d743d9", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-case-paths", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-case-paths", + "state" : { + "revision" : "6989976265be3f8d2b5802c722f9ba168e227c71", + "version" : "1.7.2" + } + }, + { + "identity" : "swift-clocks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-clocks", + "state" : { + "revision" : "cc46202b53476d64e824e0b6612da09d84ffde8e", + "version" : "1.0.6" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections", + "state" : { + "revision" : "7b847a3b7008b2dc2f47ca3110d8c782fb2e5c7e", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-concurrency-extras", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-concurrency-extras", + "state" : { + "revision" : "5a3825302b1a0d744183200915a47b508c828e6f", + "version" : "1.3.2" + } + }, + { + "identity" : "swift-custom-dump", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-custom-dump", + "state" : { + "revision" : "82645ec760917961cfa08c9c0c7104a57a0fa4b1", + "version" : "1.3.3" + } + }, + { + "identity" : "swift-dependencies", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-dependencies", + "state" : { + "revision" : "a10f9feeb214bc72b5337b6ef6d5a029360db4cc", + "version" : "1.10.0" + } + }, + { + "identity" : "swift-http-structured-headers", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-http-structured-headers.git", + "state" : { + "revision" : "a9f3c352f4d46afd155e00b3c6e85decae6bcbeb", + "version" : "1.5.0" + } + }, + { + "identity" : "swift-identified-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-identified-collections", + "state" : { + "revision" : "322d9ffeeba85c9f7c4984b39422ec7cc3c56597", + "version" : "1.1.1" + } + }, + { + "identity" : "swift-perception", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-perception", + "state" : { + "revision" : "4f47ebafed5f0b0172cf5c661454fa8e28fb2ac4", + "version" : "2.0.9" + } + }, + { + "identity" : "swift-sharing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-sharing", + "state" : { + "revision" : "3bfc408cc2d0bee2287c174da6b1c76768377818", + "version" : "2.7.4" + } + }, + { + "identity" : "swift-snapshot-testing", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing", + "state" : { + "revision" : "a8b7c5e0ed33d8ab8887d1654d9b59f2cbad529b", + "version" : "1.18.7" + } + }, + { + "identity" : "swift-structured-queries", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-structured-queries", + "state" : { + "revision" : "1447ea20550f6f02c4b48cc80931c3ed40a9c756", + "version" : "0.25.0" + } + }, + { + "identity" : "swift-syntax", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-syntax", + "state" : { + "revision" : "4799286537280063c85a32f09884cfbca301b1a1", + "version" : "602.0.0" + } + }, + { + "identity" : "swift-tagged", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/swift-tagged", + "state" : { + "revision" : "3907a9438f5b57d317001dc99f3f11b46882272b", + "version" : "0.10.0" + } + }, + { + "identity" : "xctest-dynamic-overlay", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", + "state" : { + "revision" : "4c27acf5394b645b70d8ba19dc249c0472d5f618", + "version" : "1.7.0" + } + } + ], + "version" : 3 +} diff --git a/mobile/ios/Runner/Info.plist b/mobile/ios/Runner/Info.plist index 1dc55468da..7a3a9261ae 100644 --- a/mobile/ios/Runner/Info.plist +++ b/mobile/ios/Runner/Info.plist @@ -80,7 +80,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1.0 + 2.2.1 CFBundleSignature ???? CFBundleURLTypes @@ -107,7 +107,7 @@ CFBundleVersion - 231 + 233 FLTEnableImpeller ITSAppUsesNonExemptEncryption diff --git a/mobile/ios/Runner/Schemas/Constants.swift b/mobile/ios/Runner/Schemas/Constants.swift new file mode 100644 index 0000000000..a4b0f701a1 --- /dev/null +++ b/mobile/ios/Runner/Schemas/Constants.swift @@ -0,0 +1,177 @@ +import SQLiteData + +struct Endpoint: Codable { + let url: URL + let status: Status + + enum Status: String, Codable { + case loading, valid, error, unknown + } +} + +enum StoreKey: Int, CaseIterable, QueryBindable { + // MARK: - Int + case _version = 0 + static let version = Typed(rawValue: ._version) + case _deviceIdHash = 3 + static let deviceIdHash = Typed(rawValue: ._deviceIdHash) + case _backupTriggerDelay = 8 + static let backupTriggerDelay = Typed(rawValue: ._backupTriggerDelay) + case _tilesPerRow = 103 + static let tilesPerRow = Typed(rawValue: ._tilesPerRow) + case _groupAssetsBy = 105 + static let groupAssetsBy = Typed(rawValue: ._groupAssetsBy) + case _uploadErrorNotificationGracePeriod = 106 + static let uploadErrorNotificationGracePeriod = Typed(rawValue: ._uploadErrorNotificationGracePeriod) + case _thumbnailCacheSize = 110 + static let thumbnailCacheSize = Typed(rawValue: ._thumbnailCacheSize) + case _imageCacheSize = 111 + static let imageCacheSize = Typed(rawValue: ._imageCacheSize) + case _albumThumbnailCacheSize = 112 + static let albumThumbnailCacheSize = Typed(rawValue: ._albumThumbnailCacheSize) + case _selectedAlbumSortOrder = 113 + static let selectedAlbumSortOrder = Typed(rawValue: ._selectedAlbumSortOrder) + case _logLevel = 115 + static let logLevel = Typed(rawValue: ._logLevel) + case _mapRelativeDate = 119 + static let mapRelativeDate = Typed(rawValue: ._mapRelativeDate) + case _mapThemeMode = 124 + static let mapThemeMode = Typed(rawValue: ._mapThemeMode) + + // MARK: - String + case _assetETag = 1 + static let assetETag = Typed(rawValue: ._assetETag) + case _currentUser = 2 + static let currentUser = Typed(rawValue: ._currentUser) + case _deviceId = 4 + static let deviceId = Typed(rawValue: ._deviceId) + case _accessToken = 11 + static let accessToken = Typed(rawValue: ._accessToken) + case _serverEndpoint = 12 + static let serverEndpoint = Typed(rawValue: ._serverEndpoint) + case _sslClientCertData = 15 + static let sslClientCertData = Typed(rawValue: ._sslClientCertData) + case _sslClientPasswd = 16 + static let sslClientPasswd = Typed(rawValue: ._sslClientPasswd) + case _themeMode = 102 + static let themeMode = Typed(rawValue: ._themeMode) + case _customHeaders = 127 + static let customHeaders = Typed<[String: String]>(rawValue: ._customHeaders) + case _primaryColor = 128 + static let primaryColor = Typed(rawValue: ._primaryColor) + case _preferredWifiName = 133 + static let preferredWifiName = Typed(rawValue: ._preferredWifiName) + + // MARK: - Endpoint + case _externalEndpointList = 135 + static let externalEndpointList = Typed<[Endpoint]>(rawValue: ._externalEndpointList) + + // MARK: - URL + case _localEndpoint = 134 + static let localEndpoint = Typed(rawValue: ._localEndpoint) + case _serverUrl = 10 + static let serverUrl = Typed(rawValue: ._serverUrl) + + // MARK: - Date + case _backupFailedSince = 5 + static let backupFailedSince = Typed(rawValue: ._backupFailedSince) + + // MARK: - Bool + case _backupRequireWifi = 6 + static let backupRequireWifi = Typed(rawValue: ._backupRequireWifi) + case _backupRequireCharging = 7 + static let backupRequireCharging = Typed(rawValue: ._backupRequireCharging) + case _autoBackup = 13 + static let autoBackup = Typed(rawValue: ._autoBackup) + case _backgroundBackup = 14 + static let backgroundBackup = Typed(rawValue: ._backgroundBackup) + case _loadPreview = 100 + static let loadPreview = Typed(rawValue: ._loadPreview) + case _loadOriginal = 101 + static let loadOriginal = Typed(rawValue: ._loadOriginal) + case _dynamicLayout = 104 + static let dynamicLayout = Typed(rawValue: ._dynamicLayout) + case _backgroundBackupTotalProgress = 107 + static let backgroundBackupTotalProgress = Typed(rawValue: ._backgroundBackupTotalProgress) + case _backgroundBackupSingleProgress = 108 + static let backgroundBackupSingleProgress = Typed(rawValue: ._backgroundBackupSingleProgress) + case _storageIndicator = 109 + static let storageIndicator = Typed(rawValue: ._storageIndicator) + case _advancedTroubleshooting = 114 + static let advancedTroubleshooting = Typed(rawValue: ._advancedTroubleshooting) + case _preferRemoteImage = 116 + static let preferRemoteImage = Typed(rawValue: ._preferRemoteImage) + case _loopVideo = 117 + static let loopVideo = Typed(rawValue: ._loopVideo) + case _mapShowFavoriteOnly = 118 + static let mapShowFavoriteOnly = Typed(rawValue: ._mapShowFavoriteOnly) + case _selfSignedCert = 120 + static let selfSignedCert = Typed(rawValue: ._selfSignedCert) + case _mapIncludeArchived = 121 + static let mapIncludeArchived = Typed(rawValue: ._mapIncludeArchived) + case _ignoreIcloudAssets = 122 + static let ignoreIcloudAssets = Typed(rawValue: ._ignoreIcloudAssets) + case _selectedAlbumSortReverse = 123 + static let selectedAlbumSortReverse = Typed(rawValue: ._selectedAlbumSortReverse) + case _mapwithPartners = 125 + static let mapwithPartners = Typed(rawValue: ._mapwithPartners) + case _enableHapticFeedback = 126 + static let enableHapticFeedback = Typed(rawValue: ._enableHapticFeedback) + case _dynamicTheme = 129 + static let dynamicTheme = Typed(rawValue: ._dynamicTheme) + case _colorfulInterface = 130 + static let colorfulInterface = Typed(rawValue: ._colorfulInterface) + case _syncAlbums = 131 + static let syncAlbums = Typed(rawValue: ._syncAlbums) + case _autoEndpointSwitching = 132 + static let autoEndpointSwitching = Typed(rawValue: ._autoEndpointSwitching) + case _loadOriginalVideo = 136 + static let loadOriginalVideo = Typed(rawValue: ._loadOriginalVideo) + case _manageLocalMediaAndroid = 137 + static let manageLocalMediaAndroid = Typed(rawValue: ._manageLocalMediaAndroid) + case _readonlyModeEnabled = 138 + static let readonlyModeEnabled = Typed(rawValue: ._readonlyModeEnabled) + case _autoPlayVideo = 139 + static let autoPlayVideo = Typed(rawValue: ._autoPlayVideo) + case _photoManagerCustomFilter = 1000 + static let photoManagerCustomFilter = Typed(rawValue: ._photoManagerCustomFilter) + case _betaPromptShown = 1001 + static let betaPromptShown = Typed(rawValue: ._betaPromptShown) + case _betaTimeline = 1002 + static let betaTimeline = Typed(rawValue: ._betaTimeline) + case _enableBackup = 1003 + static let enableBackup = Typed(rawValue: ._enableBackup) + case _useWifiForUploadVideos = 1004 + static let useWifiForUploadVideos = Typed(rawValue: ._useWifiForUploadVideos) + case _useWifiForUploadPhotos = 1005 + static let useWifiForUploadPhotos = Typed(rawValue: ._useWifiForUploadPhotos) + case _needBetaMigration = 1006 + static let needBetaMigration = Typed(rawValue: ._needBetaMigration) + case _shouldResetSync = 1007 + static let shouldResetSync = Typed(rawValue: ._shouldResetSync) + + struct Typed: RawRepresentable { + let rawValue: StoreKey + + @_transparent + init(rawValue value: StoreKey) { + self.rawValue = value + } + } +} + +enum BackupSelection: Int, QueryBindable { + case selected, none, excluded +} + +enum AvatarColor: Int, QueryBindable { + case primary, pink, red, yellow, blue, green, purple, orange, gray, amber +} + +enum AlbumUserRole: Int, QueryBindable { + case editor, viewer +} + +enum MemoryType: Int, QueryBindable { + case onThisDay +} diff --git a/mobile/ios/Runner/Schemas/Store.swift b/mobile/ios/Runner/Schemas/Store.swift new file mode 100644 index 0000000000..ee5280b6c0 --- /dev/null +++ b/mobile/ios/Runner/Schemas/Store.swift @@ -0,0 +1,146 @@ +import SQLiteData + +enum StoreError: Error { + case invalidJSON(String) + case invalidURL(String) + case encodingFailed +} + +protocol StoreConvertible { + associatedtype StorageType + static func fromValue(_ value: StorageType) throws(StoreError) -> Self + static func toValue(_ value: Self) throws(StoreError) -> StorageType +} + +extension Int: StoreConvertible { + static func fromValue(_ value: Int) -> Int { value } + static func toValue(_ value: Int) -> Int { value } +} + +extension Bool: StoreConvertible { + static func fromValue(_ value: Int) -> Bool { value == 1 } + static func toValue(_ value: Bool) -> Int { value ? 1 : 0 } +} + +extension Date: StoreConvertible { + static func fromValue(_ value: Int) -> Date { Date(timeIntervalSince1970: TimeInterval(value) / 1000) } + static func toValue(_ value: Date) -> Int { Int(value.timeIntervalSince1970 * 1000) } +} + +extension String: StoreConvertible { + static func fromValue(_ value: String) -> String { value } + static func toValue(_ value: String) -> String { value } +} + +extension URL: StoreConvertible { + static func fromValue(_ value: String) throws(StoreError) -> URL { + guard let url = URL(string: value) else { + throw StoreError.invalidURL(value) + } + return url + } + static func toValue(_ value: URL) -> String { value.absoluteString } +} + +extension StoreConvertible where Self: Codable, StorageType == String { + static var jsonDecoder: JSONDecoder { JSONDecoder() } + static var jsonEncoder: JSONEncoder { JSONEncoder() } + + static func fromValue(_ value: String) throws(StoreError) -> Self { + do { + return try jsonDecoder.decode(Self.self, from: Data(value.utf8)) + } catch { + throw StoreError.invalidJSON(value) + } + } + + static func toValue(_ value: Self) throws(StoreError) -> String { + let encoded: Data + do { + encoded = try jsonEncoder.encode(value) + } catch { + throw StoreError.encodingFailed + } + + guard let string = String(data: encoded, encoding: .utf8) else { + throw StoreError.encodingFailed + } + return string + } +} + +extension Array: StoreConvertible where Element: Codable { + typealias StorageType = String +} + +extension Dictionary: StoreConvertible where Key == String, Value: Codable { + typealias StorageType = String +} + +class StoreRepository { + private let db: DatabasePool + + init(db: DatabasePool) { + self.db = db + } + + func get(_ key: StoreKey.Typed) throws -> T? where T.StorageType == Int { + let query = Store.select(\.intValue).where { $0.id.eq(key.rawValue) } + if let value = try db.read({ conn in try query.fetchOne(conn) }) ?? nil { + return try T.fromValue(value) + } + return nil + } + + func get(_ key: StoreKey.Typed) throws -> T? where T.StorageType == String { + let query = Store.select(\.stringValue).where { $0.id.eq(key.rawValue) } + if let value = try db.read({ conn in try query.fetchOne(conn) }) ?? nil { + return try T.fromValue(value) + } + return nil + } + + func get(_ key: StoreKey.Typed) async throws -> T? where T.StorageType == Int { + let query = Store.select(\.intValue).where { $0.id.eq(key.rawValue) } + if let value = try await db.read({ conn in try query.fetchOne(conn) }) ?? nil { + return try T.fromValue(value) + } + return nil + } + + func get(_ key: StoreKey.Typed) async throws -> T? where T.StorageType == String { + let query = Store.select(\.stringValue).where { $0.id.eq(key.rawValue) } + if let value = try await db.read({ conn in try query.fetchOne(conn) }) ?? nil { + return try T.fromValue(value) + } + return nil + } + + func set(_ key: StoreKey.Typed, value: T) throws where T.StorageType == Int { + let value = try T.toValue(value) + try db.write { conn in + try Store.upsert { Store(id: key.rawValue, stringValue: nil, intValue: value) }.execute(conn) + } + } + + func set(_ key: StoreKey.Typed, value: T) throws where T.StorageType == String { + let value = try T.toValue(value) + try db.write { conn in + try Store.upsert { Store(id: key.rawValue, stringValue: value, intValue: nil) }.execute(conn) + } + } + + func set(_ key: StoreKey.Typed, value: T) async throws where T.StorageType == Int { + let value = try T.toValue(value) + try await db.write { conn in + try Store.upsert { Store(id: key.rawValue, stringValue: nil, intValue: value) }.execute(conn) + } + } + + func set(_ key: StoreKey.Typed, value: T) async throws where T.StorageType == String { + let value = try T.toValue(value) + try await db.write { conn in + try Store.upsert { Store(id: key.rawValue, stringValue: value, intValue: nil) }.execute(conn) + } + } +} diff --git a/mobile/ios/Runner/Schemas/Tables.swift b/mobile/ios/Runner/Schemas/Tables.swift new file mode 100644 index 0000000000..c256b0d0ed --- /dev/null +++ b/mobile/ios/Runner/Schemas/Tables.swift @@ -0,0 +1,237 @@ +import GRDB +import SQLiteData + +@Table("asset_face_entity") +struct AssetFace { + let id: String + let assetId: String + let personId: String? + let imageWidth: Int + let imageHeight: Int + let boundingBoxX1: Int + let boundingBoxY1: Int + let boundingBoxX2: Int + let boundingBoxY2: Int + let sourceType: String +} + +@Table("auth_user_entity") +struct AuthUser { + let id: String + let name: String + let email: String + let isAdmin: Bool + let hasProfileImage: Bool + let profileChangedAt: Date + let avatarColor: AvatarColor + let quotaSizeInBytes: Int + let quotaUsageInBytes: Int + let pinCode: String? +} + +@Table("local_album_entity") +struct LocalAlbum { + let id: String + let backupSelection: BackupSelection + let linkedRemoteAlbumId: String? + let marker_: Bool? + let name: String + let isIosSharedAlbum: Bool + let updatedAt: Date +} + +@Table("local_album_asset_entity") +struct LocalAlbumAsset { + let id: ID + let marker_: String? + + @Selection + struct ID { + let assetId: String + let albumId: String + } +} + +@Table("local_asset_entity") +struct LocalAsset { + let id: String + let checksum: String? + let createdAt: Date + let durationInSeconds: Int? + let height: Int? + let isFavorite: Bool + let name: String + let orientation: String + let type: Int + let updatedAt: Date + let width: Int? +} + +@Table("memory_asset_entity") +struct MemoryAsset { + let id: ID + + @Selection + struct ID { + let assetId: String + let albumId: String + } +} + +@Table("memory_entity") +struct Memory { + let id: String + let createdAt: Date + let updatedAt: Date + let deletedAt: Date? + let ownerId: String + let type: MemoryType + let data: String + let isSaved: Bool + let memoryAt: Date + let seenAt: Date? + let showAt: Date? + let hideAt: Date? +} + +@Table("partner_entity") +struct Partner { + let id: ID + let inTimeline: Bool + + @Selection + struct ID { + let sharedById: String + let sharedWithId: String + } +} + +@Table("person_entity") +struct Person { + let id: String + let createdAt: Date + let updatedAt: Date + let ownerId: String + let name: String + let faceAssetId: String? + let isFavorite: Bool + let isHidden: Bool + let color: String? + let birthDate: Date? +} + +@Table("remote_album_entity") +struct RemoteAlbum { + let id: String + let createdAt: Date + let description: String? + let isActivityEnabled: Bool + let name: String + let order: Int + let ownerId: String + let thumbnailAssetId: String? + let updatedAt: Date +} + +@Table("remote_album_asset_entity") +struct RemoteAlbumAsset { + let id: ID + + @Selection + struct ID { + let assetId: String + let albumId: String + } +} + +@Table("remote_album_user_entity") +struct RemoteAlbumUser { + let id: ID + let role: AlbumUserRole + + @Selection + struct ID { + let albumId: String + let userId: String + } +} + +@Table("remote_asset_entity") +struct RemoteAsset { + let id: String + let checksum: String? + let deletedAt: Date? + let isFavorite: Int + let libraryId: String? + let livePhotoVideoId: String? + let localDateTime: Date? + let orientation: String + let ownerId: String + let stackId: String? + let visibility: Int +} + +@Table("remote_exif_entity") +struct RemoteExif { + @Column(primaryKey: true) + let assetId: String + let city: String? + let state: String? + let country: String? + let dateTimeOriginal: Date? + let description: String? + let height: Int? + let width: Int? + let exposureTime: String? + let fNumber: Double? + let fileSize: Int? + let focalLength: Double? + let latitude: Double? + let longitude: Double? + let iso: Int? + let make: String? + let model: String? + let lens: String? + let orientation: String? + let timeZone: String? + let rating: Int? + let projectionType: String? +} + +@Table("stack_entity") +struct Stack { + let id: String + let createdAt: Date + let updatedAt: Date + let ownerId: String + let primaryAssetId: String +} + +@Table("store_entity") +struct Store { + let id: StoreKey + let stringValue: String? + let intValue: Int? +} + +@Table("user_entity") +struct User { + let id: String + let name: String + let email: String + let hasProfileImage: Bool + let profileChangedAt: Date + let avatarColor: AvatarColor +} + +@Table("user_metadata_entity") +struct UserMetadata { + let id: ID + let value: Data + + @Selection + struct ID { + let userId: String + let key: Date + } +} diff --git a/mobile/ios/Runner/Sync/Messages.g.swift b/mobile/ios/Runner/Sync/Messages.g.swift index 6bcafb9215..bbe18e7375 100644 --- a/mobile/ios/Runner/Sync/Messages.g.swift +++ b/mobile/ios/Runner/Sync/Messages.g.swift @@ -364,6 +364,7 @@ protocol NativeSyncApi { func getAssetsForAlbum(albumId: String, updatedTimeCond: Int64?) throws -> [PlatformAsset] func hashAssets(assetIds: [String], allowNetworkAccess: Bool, completion: @escaping (Result<[HashResult], Error>) -> Void) func cancelHashing() throws + func getTrashedAssets() throws -> [String: [PlatformAsset]] } /// Generated setup class from Pigeon to handle messages through the `binaryMessenger`. @@ -532,5 +533,20 @@ class NativeSyncApiSetup { } else { cancelHashingChannel.setMessageHandler(nil) } + let getTrashedAssetsChannel = taskQueue == nil + ? FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec) + : FlutterBasicMessageChannel(name: "dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets\(channelSuffix)", binaryMessenger: binaryMessenger, codec: codec, taskQueue: taskQueue) + if let api = api { + getTrashedAssetsChannel.setMessageHandler { _, reply in + do { + let result = try api.getTrashedAssets() + reply(wrapResult(result)) + } catch { + reply(wrapError(error)) + } + } + } else { + getTrashedAssetsChannel.setMessageHandler(nil) + } } } diff --git a/mobile/ios/Runner/Sync/MessagesImpl.swift b/mobile/ios/Runner/Sync/MessagesImpl.swift index 75981fb7ea..03493f57ca 100644 --- a/mobile/ios/Runner/Sync/MessagesImpl.swift +++ b/mobile/ios/Runner/Sync/MessagesImpl.swift @@ -3,15 +3,15 @@ import CryptoKit struct AssetWrapper: Hashable, Equatable { let asset: PlatformAsset - + init(with asset: PlatformAsset) { self.asset = asset } - + func hash(into hasher: inout Hasher) { hasher.combine(self.asset.id) } - + static func == (lhs: AssetWrapper, rhs: AssetWrapper) -> Bool { return lhs.asset.id == rhs.asset.id } @@ -19,31 +19,31 @@ struct AssetWrapper: Hashable, Equatable { class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { static let name = "NativeSyncApi" - + static func register(with registrar: any FlutterPluginRegistrar) { let instance = NativeSyncApiImpl() NativeSyncApiSetup.setUp(binaryMessenger: registrar.messenger(), api: instance) registrar.publish(instance) } - + func detachFromEngine(for registrar: any FlutterPluginRegistrar) { super.detachFromEngine() } - + private let defaults: UserDefaults private let changeTokenKey = "immich:changeToken" private let albumTypes: [PHAssetCollectionType] = [.album, .smartAlbum] private let recoveredAlbumSubType = 1000000219 - + private var hashTask: Task? private static let hashCancelledCode = "HASH_CANCELLED" private static let hashCancelled = Result<[HashResult], Error>.failure(PigeonError(code: hashCancelledCode, message: "Hashing cancelled", details: nil)) - - + + init(with defaults: UserDefaults = .standard) { self.defaults = defaults } - + @available(iOS 16, *) private func getChangeToken() -> PHPersistentChangeToken? { guard let data = defaults.data(forKey: changeTokenKey) else { @@ -51,7 +51,7 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { } return try? NSKeyedUnarchiver.unarchivedObject(ofClass: PHPersistentChangeToken.self, from: data) } - + @available(iOS 16, *) private func saveChangeToken(token: PHPersistentChangeToken) -> Void { guard let data = try? NSKeyedArchiver.archivedData(withRootObject: token, requiringSecureCoding: true) else { @@ -59,18 +59,18 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { } defaults.set(data, forKey: changeTokenKey) } - + func clearSyncCheckpoint() -> Void { defaults.removeObject(forKey: changeTokenKey) } - + func checkpointSync() { guard #available(iOS 16, *) else { return } saveChangeToken(token: PHPhotoLibrary.shared().currentChangeToken) } - + func shouldFullSync() -> Bool { guard #available(iOS 16, *), PHPhotoLibrary.authorizationStatus(for: .readWrite) == .authorized, @@ -78,36 +78,36 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { // When we do not have access to photo library, older iOS version or No token available, fallback to full sync return true } - + guard let _ = try? PHPhotoLibrary.shared().fetchPersistentChanges(since: storedToken) else { // Cannot fetch persistent changes return true } - + return false } - + func getAlbums() throws -> [PlatformAlbum] { var albums: [PlatformAlbum] = [] - + albumTypes.forEach { type in let collections = PHAssetCollection.fetchAssetCollections(with: type, subtype: .any, options: nil) for i in 0.. SyncDelta { guard #available(iOS 16, *) else { throw PigeonError(code: "UNSUPPORTED_OS", message: "This feature requires iOS 16 or later.", details: nil) } - + guard PHPhotoLibrary.authorizationStatus(for: .readWrite) == .authorized else { throw PigeonError(code: "NO_AUTH", message: "No photo library access", details: nil) } - + guard let storedToken = getChangeToken() else { // No token exists, definitely need a full sync print("MediaManager::getMediaChanges: No token found") throw PigeonError(code: "NO_TOKEN", message: "No stored change token", details: nil) } - + let currentToken = PHPhotoLibrary.shared().currentChangeToken if storedToken == currentToken { return SyncDelta(hasChanges: false, updates: [], deletes: [], assetAlbums: [:]) } - + do { let changes = try PHPhotoLibrary.shared().fetchPersistentChanges(since: storedToken) - + var updatedAssets: Set = [] var deletedAssets: Set = [] - + for change in changes { guard let details = try? change.changeDetails(for: PHObjectType.asset) else { continue } - + let updated = details.updatedLocalIdentifiers.union(details.insertedLocalIdentifiers) deletedAssets.formUnion(details.deletedLocalIdentifiers) - + if (updated.isEmpty) { continue } - + let options = PHFetchOptions() options.includeHiddenAssets = false let result = PHAsset.fetchAssets(withLocalIdentifiers: Array(updated), options: options) for i in 0..) -> [String: [String]] { guard !assets.isEmpty else { return [:] } - + var albumAssets: [String: [String]] = [:] - + for type in albumTypes { let collections = PHAssetCollection.fetchAssetCollections(with: type, subtype: .any, options: nil) collections.enumerateObjects { (album, _, _) in @@ -211,13 +211,13 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { } return albumAssets } - + func getAssetIdsForAlbum(albumId: String) throws -> [String] { let collections = PHAssetCollection.fetchAssetCollections(withLocalIdentifiers: [albumId], options: nil) guard let album = collections.firstObject else { return [] } - + var ids: [String] = [] let options = PHFetchOptions() options.includeHiddenAssets = false @@ -227,13 +227,13 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { } return ids } - + func getAssetsCountSince(albumId: String, timestamp: Int64) throws -> Int64 { let collections = PHAssetCollection.fetchAssetCollections(withLocalIdentifiers: [albumId], options: nil) guard let album = collections.firstObject else { return 0 } - + let date = NSDate(timeIntervalSince1970: TimeInterval(timestamp)) let options = PHFetchOptions() options.predicate = NSPredicate(format: "creationDate > %@ OR modificationDate > %@", date, date) @@ -241,32 +241,32 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { let assets = getAssetsFromAlbum(in: album, options: options) return Int64(assets.count) } - + func getAssetsForAlbum(albumId: String, updatedTimeCond: Int64?) throws -> [PlatformAsset] { let collections = PHAssetCollection.fetchAssetCollections(withLocalIdentifiers: [albumId], options: nil) guard let album = collections.firstObject else { return [] } - + let options = PHFetchOptions() options.includeHiddenAssets = false if(updatedTimeCond != nil) { let date = NSDate(timeIntervalSince1970: TimeInterval(updatedTimeCond!)) options.predicate = NSPredicate(format: "creationDate > %@ OR modificationDate > %@", date, date) } - + let result = getAssetsFromAlbum(in: album, options: options) if(result.count == 0) { return [] } - + var assets: [PlatformAsset] = [] result.enumerateObjects { (asset, _, _) in assets.append(asset.toPlatformAsset()) } return assets } - + func hashAssets(assetIds: [String], allowNetworkAccess: Bool, completion: @escaping (Result<[HashResult], Error>) -> Void) { if let prevTask = hashTask { prevTask.cancel() @@ -284,11 +284,11 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { missingAssetIds.remove(asset.localIdentifier) assets.append(asset) } - + if Task.isCancelled { return self?.completeWhenActive(for: completion, with: Self.hashCancelled) } - + await withTaskGroup(of: HashResult?.self) { taskGroup in var results = [HashResult]() results.reserveCapacity(assets.count) @@ -301,28 +301,28 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { return await self.hashAsset(asset, allowNetworkAccess: allowNetworkAccess) } } - + for await result in taskGroup { guard let result = result else { return self?.completeWhenActive(for: completion, with: Self.hashCancelled) } results.append(result) } - + for missing in missingAssetIds { results.append(HashResult(assetId: missing, error: "Asset not found in library", hash: nil)) } - + return self?.completeWhenActive(for: completion, with: .success(results)) } } } - + func cancelHashing() { hashTask?.cancel() hashTask = nil } - + private func hashAsset(_ asset: PHAsset, allowNetworkAccess: Bool) async -> HashResult? { class RequestRef { var id: PHAssetResourceDataRequestID? @@ -332,21 +332,21 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { if Task.isCancelled { return nil } - + guard let resource = asset.getResource() else { return HashResult(assetId: asset.localIdentifier, error: "Cannot get asset resource", hash: nil) } - + if Task.isCancelled { return nil } - + let options = PHAssetResourceRequestOptions() options.isNetworkAccessAllowed = allowNetworkAccess - + return await withCheckedContinuation { continuation in var hasher = Insecure.SHA1() - + requestRef.id = PHAssetResourceManager.default().requestData( for: resource, options: options, @@ -377,7 +377,11 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin { PHAssetResourceManager.default().cancelDataRequest(requestId) }) } - + + func getTrashedAssets() throws -> [String: [PlatformAsset]] { + throw PigeonError(code: "UNSUPPORTED_OS", message: "This feature not supported on iOS.", details: nil) + } + private func getAssetsFromAlbum(in album: PHAssetCollection, options: PHFetchOptions) -> PHFetchResult { // Ensure to actually getting all assets for the Recents album if (album.assetCollectionSubtype == .smartAlbumUserLibrary) { diff --git a/mobile/ios/fastlane/Fastfile b/mobile/ios/fastlane/Fastfile index 260b729579..c3dfea5f66 100644 --- a/mobile/ios/fastlane/Fastfile +++ b/mobile/ios/fastlane/Fastfile @@ -16,42 +16,92 @@ default_platform(:ios) platform :ios do - desc "iOS Release to TestFlight" - lane :release_ci do - # Setup CI environment - setup_ci - - # Load App Store Connect API Key - api_key = app_store_connect_api_key( + # Constants + TEAM_ID = "2F67MQ8R79" + CODE_SIGN_IDENTITY = "Apple Distribution: Hau Tran (#{TEAM_ID})" + BASE_BUNDLE_ID = "app.alextran.immich" + + # Helper method to get App Store Connect API key + def get_api_key + app_store_connect_api_key( key_id: ENV["APP_STORE_CONNECT_API_KEY_ID"], issuer_id: ENV["APP_STORE_CONNECT_API_KEY_ISSUER_ID"], - key_filepath: "api_key.json" + key_filepath: "#{Dir.home}/.appstoreconnect/private_keys/AuthKey_#{ENV['APP_STORE_CONNECT_API_KEY_ID']}.p8", + duration: 1200, + in_house: false ) + end + + # Helper method to get version from pubspec.yaml +def get_version_from_pubspec + require 'yaml' + + pubspec_path = File.join(Dir.pwd, "../..", "pubspec.yaml") + pubspec = YAML.load_file(pubspec_path) + + version_string = pubspec['version'] + version_string ? version_string.split('+').first : nil +end + + # Helper method to configure code signing for all targets + def configure_code_signing(bundle_id_suffix: "") + bundle_suffix = bundle_id_suffix.empty? ? "" : ".#{bundle_id_suffix}" - # Import certificate and provisioning profile - import_certificate( - certificate_path: "certificate.p12", - certificate_password: ENV["IOS_CERTIFICATE_PASSWORD"], - keychain_name: ENV["KEYCHAIN_NAME"], - keychain_password: ENV["KEYCHAIN_PASSWORD"] - ) - - # Install provisioning profile - install_provisioning_profile(path: "profile.mobileprovision") - - # Configure code signing + # Runner (main app) update_code_signing_settings( use_automatic_signing: false, path: "./Runner.xcodeproj", - team_id: ENV["FASTLANE_TEAM_ID"], - profile_name: "app.alextran.immich AppStore" + team_id: ENV["FASTLANE_TEAM_ID"] || TEAM_ID, + code_sign_identity: CODE_SIGN_IDENTITY, + bundle_identifier: "#{BASE_BUNDLE_ID}#{bundle_suffix}", + profile_name: "#{BASE_BUNDLE_ID}#{bundle_suffix} AppStore", + targets: ["Runner"] ) + # ShareExtension + update_code_signing_settings( + use_automatic_signing: false, + path: "./Runner.xcodeproj", + team_id: ENV["FASTLANE_TEAM_ID"] || TEAM_ID, + code_sign_identity: CODE_SIGN_IDENTITY, + bundle_identifier: "#{BASE_BUNDLE_ID}#{bundle_suffix}.ShareExtension", + profile_name: "#{BASE_BUNDLE_ID}#{bundle_suffix}.ShareExtension AppStore", + targets: ["ShareExtension"] + ) + + # WidgetExtension + update_code_signing_settings( + use_automatic_signing: false, + path: "./Runner.xcodeproj", + team_id: ENV["FASTLANE_TEAM_ID"] || TEAM_ID, + code_sign_identity: CODE_SIGN_IDENTITY, + bundle_identifier: "#{BASE_BUNDLE_ID}#{bundle_suffix}.Widget", + profile_name: "#{BASE_BUNDLE_ID}#{bundle_suffix}.Widget AppStore", + targets: ["WidgetExtension"] + ) + end + + # Helper method to build and upload to TestFlight + def build_and_upload( + api_key:, + bundle_id_suffix: "", + configuration: "Release", + distribute_external: true, + version_number: nil + ) + bundle_suffix = bundle_id_suffix.empty? ? "" : ".#{bundle_id_suffix}" + app_identifier = "#{BASE_BUNDLE_ID}#{bundle_suffix}" + + # Set version number if provided + if version_number + increment_version_number(version_number: version_number) + end + # Increment build number increment_build_number( build_number: latest_testflight_build_number( api_key: api_key, - app_identifier: "app.alextran.immich" + app_identifier: app_identifier ) + 1, xcodeproj: "./Runner.xcodeproj" ) @@ -60,35 +110,101 @@ platform :ios do build_app( scheme: "Runner", workspace: "Runner.xcworkspace", + configuration: configuration, export_method: "app-store", + xcargs: "CODE_SIGN_IDENTITY='#{CODE_SIGN_IDENTITY}' CODE_SIGN_STYLE=Manual", export_options: { provisioningProfiles: { - "app.alextran.immich" => "app.alextran.immich AppStore" - } + "#{app_identifier}" => "#{app_identifier} AppStore", + "#{app_identifier}.ShareExtension" => "#{app_identifier}.ShareExtension AppStore", + "#{app_identifier}.Widget" => "#{app_identifier}.Widget AppStore" + }, + signingStyle: "manual", + signingCertificate: CODE_SIGN_IDENTITY } ) # Upload to TestFlight upload_to_testflight( api_key: api_key, - skip_waiting_for_build_processing: true + skip_waiting_for_build_processing: true, + distribute_external: distribute_external + ) + end + + desc "iOS Development Build to TestFlight (requires separate bundle ID)" + lane :gha_testflight_dev do + api_key = get_api_key + + # Install development provisioning profiles + install_provisioning_profile(path: "profile_dev.mobileprovision") + install_provisioning_profile(path: "profile_dev_share.mobileprovision") + install_provisioning_profile(path: "profile_dev_widget.mobileprovision") + + # Configure code signing for dev bundle IDs + configure_code_signing(bundle_id_suffix: "development") + + # Build and upload + build_and_upload( + api_key: api_key, + bundle_id_suffix: "development", + configuration: "Profile", + distribute_external: false ) end - desc "iOS Release" - lane :release do + desc "iOS Release to TestFlight" + lane :gha_release_prod do + api_key = get_api_key + + # Install provisioning profiles + install_provisioning_profile(path: "profile.mobileprovision") + install_provisioning_profile(path: "profile_share.mobileprovision") + install_provisioning_profile(path: "profile_widget.mobileprovision") + + + # Configure code signing for production bundle IDs + configure_code_signing + + # Build and upload with version number + build_and_upload( + api_key: api_key, + version_number: get_version_from_pubspec, + distribute_external: false, + ) + end + + desc "iOS Manual Release" + lane :release_manual do enable_automatic_code_signing( path: "./Runner.xcodeproj", + targets: ["Runner", "ShareExtension", "WidgetExtension"] ) + increment_version_number( - version_number: "2.2.0" + version_number: get_version_from_pubspec ) increment_build_number( build_number: latest_testflight_build_number + 1, ) - build_app(scheme: "Runner", - workspace: "Runner.xcworkspace", - xcargs: "-allowProvisioningUpdates") + + # Build archive with automatic signing + gym( + scheme: "Runner", + workspace: "Runner.xcworkspace", + configuration: "Release", + export_method: "app-store", + skip_package_ipa: false, + xcargs: "-allowProvisioningUpdates", + export_options: { + method: "app-store", + signingStyle: "automatic", + uploadBitcode: false, + uploadSymbols: true, + compileBitcode: false + } + ) + upload_to_testflight( skip_waiting_for_build_processing: true ) diff --git a/mobile/ios/fastlane/README.md b/mobile/ios/fastlane/README.md index 2999821730..5fc8101b3a 100644 --- a/mobile/ios/fastlane/README.md +++ b/mobile/ios/fastlane/README.md @@ -15,13 +15,29 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do ## iOS -### ios release +### ios gha_testflight_dev ```sh -[bundle exec] fastlane ios release +[bundle exec] fastlane ios gha_testflight_dev ``` -iOS Release +iOS Development Build to TestFlight (requires separate bundle ID) + +### ios gha_release_prod + +```sh +[bundle exec] fastlane ios gha_release_prod +``` + +iOS Release to TestFlight + +### ios release_manual + +```sh +[bundle exec] fastlane ios release_manual +``` + +iOS Manual Release ---- diff --git a/mobile/lib/constants/constants.dart b/mobile/lib/constants/constants.dart index 10f4e88f0f..8d4636bbe1 100644 --- a/mobile/lib/constants/constants.dart +++ b/mobile/lib/constants/constants.dart @@ -53,3 +53,11 @@ const int kMinMonthsToEnableScrubberSnap = 12; const String kImmichAppStoreLink = "https://apps.apple.com/app/immich/id6449244941"; const String kImmichPlayStoreLink = "https://play.google.com/store/apps/details?id=app.alextran.immich"; const String kImmichLatestRelease = "https://github.com/immich-app/immich/releases/latest"; + +const int kPhotoTabIndex = 0; +const int kSearchTabIndex = 1; +const int kAlbumTabIndex = 2; +const int kLibraryTabIndex = 3; + +// Workaround for SQLite's variable limit (SQLITE_MAX_VARIABLE_NUMBER = 32766) +const int kDriftMaxChunk = 32000; diff --git a/mobile/lib/domain/services/background_worker.service.dart b/mobile/lib/domain/services/background_worker.service.dart index 5c228ba67c..28c87293f9 100644 --- a/mobile/lib/domain/services/background_worker.service.dart +++ b/mobile/lib/domain/services/background_worker.service.dart @@ -239,7 +239,7 @@ class BackgroundWorkerBgService extends BackgroundWorkerFlutterApi { final networkCapabilities = await _ref?.read(connectivityApiProvider).getCapabilities() ?? []; return _ref ?.read(uploadServiceProvider) - .startBackupWithHttpClient(currentUser.id, networkCapabilities.hasWifi, _cancellationToken); + .startBackupWithHttpClient(currentUser.id, networkCapabilities.isUnmetered, _cancellationToken); }, (error, stack) { dPrint(() => "Error in backup zone $error, $stack"); diff --git a/mobile/lib/domain/services/hash.service.dart b/mobile/lib/domain/services/hash.service.dart index 90f29b8bc1..5e81643fc5 100644 --- a/mobile/lib/domain/services/hash.service.dart +++ b/mobile/lib/domain/services/hash.service.dart @@ -2,8 +2,10 @@ import 'package:flutter/services.dart'; import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/infrastructure/repositories/local_album.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/platform/native_sync_api.g.dart'; import 'package:logging/logging.dart'; @@ -13,6 +15,7 @@ class HashService { final int _batchSize; final DriftLocalAlbumRepository _localAlbumRepository; final DriftLocalAssetRepository _localAssetRepository; + final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; final NativeSyncApi _nativeSyncApi; final bool Function()? _cancelChecker; final _log = Logger('HashService'); @@ -20,11 +23,13 @@ class HashService { HashService({ required DriftLocalAlbumRepository localAlbumRepository, required DriftLocalAssetRepository localAssetRepository, + required DriftTrashedLocalAssetRepository trashedLocalAssetRepository, required NativeSyncApi nativeSyncApi, bool Function()? cancelChecker, int? batchSize, }) : _localAlbumRepository = localAlbumRepository, _localAssetRepository = localAssetRepository, + _trashedLocalAssetRepository = trashedLocalAssetRepository, _cancelChecker = cancelChecker, _nativeSyncApi = nativeSyncApi, _batchSize = batchSize ?? kBatchHashFileLimit; @@ -49,6 +54,14 @@ class HashService { await _hashAssets(album, assetsToHash); } } + if (CurrentPlatform.isAndroid && localAlbums.isNotEmpty) { + final backupAlbumIds = localAlbums.map((e) => e.id); + final trashedToHash = await _trashedLocalAssetRepository.getAssetsToHash(backupAlbumIds); + if (trashedToHash.isNotEmpty) { + final pseudoAlbum = LocalAlbum(id: '-pseudoAlbum', name: 'Trash', updatedAt: DateTime.now()); + await _hashAssets(pseudoAlbum, trashedToHash, isTrashed: true); + } + } } on PlatformException catch (e) { if (e.code == _kHashCancelledCode) { _log.warning("Hashing cancelled by platform"); @@ -65,7 +78,7 @@ class HashService { /// Processes a list of [LocalAsset]s, storing their hash and updating the assets in the DB /// with hash for those that were successfully hashed. Hashes are looked up in a table /// [LocalAssetHashEntity] by local id. Only missing entries are newly hashed and added to the DB. - Future _hashAssets(LocalAlbum album, List assetsToHash) async { + Future _hashAssets(LocalAlbum album, List assetsToHash, {bool isTrashed = false}) async { final toHash = {}; for (final asset in assetsToHash) { @@ -76,16 +89,16 @@ class HashService { toHash[asset.id] = asset; if (toHash.length == _batchSize) { - await _processBatch(album, toHash); + await _processBatch(album, toHash, isTrashed); toHash.clear(); } } - await _processBatch(album, toHash); + await _processBatch(album, toHash, isTrashed); } /// Processes a batch of assets. - Future _processBatch(LocalAlbum album, Map toHash) async { + Future _processBatch(LocalAlbum album, Map toHash, bool isTrashed) async { if (toHash.isEmpty) { return; } @@ -120,7 +133,10 @@ class HashService { } _log.fine("Hashed ${hashed.length}/${toHash.length} assets"); - - await _localAssetRepository.updateHashes(hashed); + if (isTrashed) { + await _trashedLocalAssetRepository.updateHashes(hashed); + } else { + await _localAssetRepository.updateHashes(hashed); + } } } diff --git a/mobile/lib/domain/services/local_sync.service.dart b/mobile/lib/domain/services/local_sync.service.dart index 94a8a19e73..5cbae9c5a1 100644 --- a/mobile/lib/domain/services/local_sync.service.dart +++ b/mobile/lib/domain/services/local_sync.service.dart @@ -4,9 +4,14 @@ import 'package:collection/collection.dart'; import 'package:flutter/foundation.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/infrastructure/repositories/local_album.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/storage.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/platform/native_sync_api.g.dart'; +import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; import 'package:immich_mobile/utils/datetime_helpers.dart'; import 'package:immich_mobile/utils/diff.dart'; import 'package:logging/logging.dart'; @@ -14,15 +19,34 @@ import 'package:logging/logging.dart'; class LocalSyncService { final DriftLocalAlbumRepository _localAlbumRepository; final NativeSyncApi _nativeSyncApi; + final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; + final LocalFilesManagerRepository _localFilesManager; + final StorageRepository _storageRepository; final Logger _log = Logger("DeviceSyncService"); - LocalSyncService({required DriftLocalAlbumRepository localAlbumRepository, required NativeSyncApi nativeSyncApi}) - : _localAlbumRepository = localAlbumRepository, - _nativeSyncApi = nativeSyncApi; + LocalSyncService({ + required DriftLocalAlbumRepository localAlbumRepository, + required DriftTrashedLocalAssetRepository trashedLocalAssetRepository, + required LocalFilesManagerRepository localFilesManager, + required StorageRepository storageRepository, + required NativeSyncApi nativeSyncApi, + }) : _localAlbumRepository = localAlbumRepository, + _trashedLocalAssetRepository = trashedLocalAssetRepository, + _localFilesManager = localFilesManager, + _storageRepository = storageRepository, + _nativeSyncApi = nativeSyncApi; Future sync({bool full = false}) async { final Stopwatch stopwatch = Stopwatch()..start(); try { + if (CurrentPlatform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false)) { + final hasPermission = await _localFilesManager.hasManageMediaPermission(); + if (hasPermission) { + await _syncTrashedAssets(); + } else { + _log.warning("syncTrashedAssets cannot proceed because MANAGE_MEDIA permission is missing"); + } + } if (full || await _nativeSyncApi.shouldFullSync()) { _log.fine("Full sync request from ${full ? "user" : "native"}"); return await fullSync(); @@ -69,7 +93,6 @@ class LocalSyncService { await updateAlbum(dbAlbum, album); } } - await _nativeSyncApi.checkpointSync(); } catch (e, s) { _log.severe("Error performing device sync", e, s); @@ -273,6 +296,48 @@ class LocalSyncService { bool _albumsEqual(LocalAlbum a, LocalAlbum b) { return a.name == b.name && a.assetCount == b.assetCount && a.updatedAt.isAtSameMomentAs(b.updatedAt); } + + Future _syncTrashedAssets() async { + final trashedAssetMap = await _nativeSyncApi.getTrashedAssets(); + await processTrashedAssets(trashedAssetMap); + } + + @visibleForTesting + Future processTrashedAssets(Map> trashedAssetMap) async { + if (trashedAssetMap.isEmpty) { + _log.info("syncTrashedAssets, No trashed assets found"); + } + final trashedAssets = trashedAssetMap.cast>().entries.expand( + (entry) => entry.value.cast().toTrashedAssets(entry.key), + ); + + _log.fine("syncTrashedAssets, trashedAssets: ${trashedAssets.map((e) => e.asset.id)}"); + await _trashedLocalAssetRepository.processTrashSnapshot(trashedAssets); + + final assetsToRestore = await _trashedLocalAssetRepository.getToRestore(); + if (assetsToRestore.isNotEmpty) { + final restoredIds = await _localFilesManager.restoreAssetsFromTrash(assetsToRestore); + await _trashedLocalAssetRepository.applyRestoredAssets(restoredIds); + } else { + _log.info("syncTrashedAssets, No remote assets found for restoration"); + } + + final localAssetsToTrash = await _trashedLocalAssetRepository.getToTrash(); + if (localAssetsToTrash.isNotEmpty) { + final mediaUrls = await Future.wait( + localAssetsToTrash.values + .expand((e) => e) + .map((localAsset) => _storageRepository.getAssetEntityForAsset(localAsset).then((e) => e?.getMediaUrl())), + ); + _log.info("Moving to trash ${mediaUrls.join(", ")} assets"); + final result = await _localFilesManager.moveToTrash(mediaUrls.nonNulls.toList()); + if (result) { + await _trashedLocalAssetRepository.trashLocalAsset(localAssetsToTrash); + } + } else { + _log.info("syncTrashedAssets, No assets found in backup-enabled albums for move to trash"); + } + } } extension on Iterable { @@ -290,20 +355,26 @@ extension on Iterable { extension on Iterable { List toLocalAssets() { - return map( - (e) => LocalAsset( - id: e.id, - name: e.name, - checksum: null, - type: AssetType.values.elementAtOrNull(e.type) ?? AssetType.other, - createdAt: tryFromSecondsSinceEpoch(e.createdAt, isUtc: true) ?? DateTime.timestamp(), - updatedAt: tryFromSecondsSinceEpoch(e.updatedAt, isUtc: true) ?? DateTime.timestamp(), - width: e.width, - height: e.height, - durationInSeconds: e.durationInSeconds, - orientation: e.orientation, - isFavorite: e.isFavorite, - ), - ).toList(); + return map((e) => e.toLocalAsset()).toList(); + } + + Iterable toTrashedAssets(String albumId) { + return map((e) => (albumId: albumId, asset: e.toLocalAsset())); } } + +extension on PlatformAsset { + LocalAsset toLocalAsset() => LocalAsset( + id: id, + name: name, + checksum: null, + type: AssetType.values.elementAtOrNull(type) ?? AssetType.other, + createdAt: tryFromSecondsSinceEpoch(createdAt, isUtc: true) ?? DateTime.timestamp(), + updatedAt: tryFromSecondsSinceEpoch(createdAt, isUtc: true) ?? DateTime.timestamp(), + width: width, + height: height, + durationInSeconds: durationInSeconds, + isFavorite: isFavorite, + orientation: orientation, + ); +} diff --git a/mobile/lib/domain/services/sync_stream.service.dart b/mobile/lib/domain/services/sync_stream.service.dart index 5ed11598dc..2ff0f18fcf 100644 --- a/mobile/lib/domain/services/sync_stream.service.dart +++ b/mobile/lib/domain/services/sync_stream.service.dart @@ -1,8 +1,15 @@ import 'dart:async'; +import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/models/sync_event.model.dart'; +import 'package:immich_mobile/entities/store.entity.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; +import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/storage.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_api.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; +import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; import 'package:logging/logging.dart'; import 'package:openapi/api.dart'; @@ -11,14 +18,26 @@ class SyncStreamService { final SyncApiRepository _syncApiRepository; final SyncStreamRepository _syncStreamRepository; + final DriftLocalAssetRepository _localAssetRepository; + final DriftTrashedLocalAssetRepository _trashedLocalAssetRepository; + final LocalFilesManagerRepository _localFilesManager; + final StorageRepository _storageRepository; final bool Function()? _cancelChecker; SyncStreamService({ required SyncApiRepository syncApiRepository, required SyncStreamRepository syncStreamRepository, + required DriftLocalAssetRepository localAssetRepository, + required DriftTrashedLocalAssetRepository trashedLocalAssetRepository, + required LocalFilesManagerRepository localFilesManager, + required StorageRepository storageRepository, bool Function()? cancelChecker, }) : _syncApiRepository = syncApiRepository, _syncStreamRepository = syncStreamRepository, + _localAssetRepository = localAssetRepository, + _trashedLocalAssetRepository = trashedLocalAssetRepository, + _localFilesManager = localFilesManager, + _storageRepository = storageRepository, _cancelChecker = cancelChecker; bool get isCancelled => _cancelChecker?.call() ?? false; @@ -83,7 +102,18 @@ class SyncStreamService { case SyncEntityType.partnerDeleteV1: return _syncStreamRepository.deletePartnerV1(data.cast()); case SyncEntityType.assetV1: - return _syncStreamRepository.updateAssetsV1(data.cast()); + final remoteSyncAssets = data.cast(); + await _syncStreamRepository.updateAssetsV1(remoteSyncAssets); + if (CurrentPlatform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false)) { + final hasPermission = await _localFilesManager.hasManageMediaPermission(); + if (hasPermission) { + await _handleRemoteTrashed(remoteSyncAssets.where((e) => e.deletedAt != null).map((e) => e.checksum)); + await _applyRemoteRestoreToLocal(); + } else { + _logger.warning("sync Trashed Assets cannot proceed because MANAGE_MEDIA permission is missing"); + } + } + return; case SyncEntityType.assetDeleteV1: return _syncStreamRepository.deleteAssetsV1(data.cast()); case SyncEntityType.assetExifV1: @@ -132,7 +162,8 @@ class SyncStreamService { return; // SyncCompleteV1 is used to signal the completion of the sync process. Cleanup stale assets and signal completion case SyncEntityType.syncCompleteV1: - return _syncStreamRepository.pruneAssets(); + return; + // return _syncStreamRepository.pruneAssets(); // Request to reset the client state. Clear everything related to remote entities case SyncEntityType.syncResetV1: return _syncStreamRepository.reset(); @@ -211,4 +242,36 @@ class SyncStreamService { _logger.severe("Error processing AssetUploadReadyV1 websocket batch events", error, stackTrace); } } + + Future _handleRemoteTrashed(Iterable checksums) async { + if (checksums.isEmpty) { + return Future.value(); + } else { + final localAssetsToTrash = await _localAssetRepository.getAssetsFromBackupAlbums(checksums); + if (localAssetsToTrash.isNotEmpty) { + final mediaUrls = await Future.wait( + localAssetsToTrash.values + .expand((e) => e) + .map((localAsset) => _storageRepository.getAssetEntityForAsset(localAsset).then((e) => e?.getMediaUrl())), + ); + _logger.info("Moving to trash ${mediaUrls.join(", ")} assets"); + final result = await _localFilesManager.moveToTrash(mediaUrls.nonNulls.toList()); + if (result) { + await _trashedLocalAssetRepository.trashLocalAsset(localAssetsToTrash); + } + } else { + _logger.info("No assets found in backup-enabled albums for assets: $checksums"); + } + } + } + + Future _applyRemoteRestoreToLocal() async { + final assetsToRestore = await _trashedLocalAssetRepository.getToRestore(); + if (assetsToRestore.isNotEmpty) { + final restoredIds = await _localFilesManager.restoreAssetsFromTrash(assetsToRestore); + await _trashedLocalAssetRepository.applyRestoredAssets(restoredIds); + } else { + _logger.info("No remote assets found for restoration"); + } + } } diff --git a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart new file mode 100644 index 0000000000..308130b9ea --- /dev/null +++ b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart @@ -0,0 +1,40 @@ +import 'package:drift/drift.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/utils/asset.mixin.dart'; +import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart'; + +@TableIndex.sql('CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)') +@TableIndex.sql('CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)') +class TrashedLocalAssetEntity extends Table with DriftDefaultsMixin, AssetEntityMixin { + const TrashedLocalAssetEntity(); + + TextColumn get id => text()(); + + TextColumn get albumId => text()(); + + TextColumn get checksum => text().nullable()(); + + BoolColumn get isFavorite => boolean().withDefault(const Constant(false))(); + + IntColumn get orientation => integer().withDefault(const Constant(0))(); + + @override + Set get primaryKey => {id, albumId}; +} + +extension TrashedLocalAssetEntityDataDomainExtension on TrashedLocalAssetEntityData { + LocalAsset toLocalAsset() => LocalAsset( + id: id, + name: name, + checksum: checksum, + type: type, + createdAt: createdAt, + updatedAt: updatedAt, + durationInSeconds: durationInSeconds, + isFavorite: isFavorite, + height: height, + width: width, + orientation: orientation, + ); +} diff --git a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart new file mode 100644 index 0000000000..aab226c3a2 --- /dev/null +++ b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart @@ -0,0 +1,1080 @@ +// dart format width=80 +// ignore_for_file: type=lint +import 'package:drift/drift.dart' as i0; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart' + as i1; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart' as i2; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart' + as i3; +import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; + +typedef $$TrashedLocalAssetEntityTableCreateCompanionBuilder = + i1.TrashedLocalAssetEntityCompanion Function({ + required String name, + required i2.AssetType type, + i0.Value createdAt, + i0.Value updatedAt, + i0.Value width, + i0.Value height, + i0.Value durationInSeconds, + required String id, + required String albumId, + i0.Value checksum, + i0.Value isFavorite, + i0.Value orientation, + }); +typedef $$TrashedLocalAssetEntityTableUpdateCompanionBuilder = + i1.TrashedLocalAssetEntityCompanion Function({ + i0.Value name, + i0.Value type, + i0.Value createdAt, + i0.Value updatedAt, + i0.Value width, + i0.Value height, + i0.Value durationInSeconds, + i0.Value id, + i0.Value albumId, + i0.Value checksum, + i0.Value isFavorite, + i0.Value orientation, + }); + +class $$TrashedLocalAssetEntityTableFilterComposer + extends + i0.Composer { + $$TrashedLocalAssetEntityTableFilterComposer({ + required super.$db, + required super.$table, + super.joinBuilder, + super.$addJoinBuilderToRootComposer, + super.$removeJoinBuilderFromRootComposer, + }); + i0.ColumnFilters get name => $composableBuilder( + column: $table.name, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnWithTypeConverterFilters get type => + $composableBuilder( + column: $table.type, + builder: (column) => i0.ColumnWithTypeConverterFilters(column), + ); + + i0.ColumnFilters get createdAt => $composableBuilder( + column: $table.createdAt, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get updatedAt => $composableBuilder( + column: $table.updatedAt, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get width => $composableBuilder( + column: $table.width, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get height => $composableBuilder( + column: $table.height, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get durationInSeconds => $composableBuilder( + column: $table.durationInSeconds, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get id => $composableBuilder( + column: $table.id, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get albumId => $composableBuilder( + column: $table.albumId, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get checksum => $composableBuilder( + column: $table.checksum, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get isFavorite => $composableBuilder( + column: $table.isFavorite, + builder: (column) => i0.ColumnFilters(column), + ); + + i0.ColumnFilters get orientation => $composableBuilder( + column: $table.orientation, + builder: (column) => i0.ColumnFilters(column), + ); +} + +class $$TrashedLocalAssetEntityTableOrderingComposer + extends + i0.Composer { + $$TrashedLocalAssetEntityTableOrderingComposer({ + required super.$db, + required super.$table, + super.joinBuilder, + super.$addJoinBuilderToRootComposer, + super.$removeJoinBuilderFromRootComposer, + }); + i0.ColumnOrderings get name => $composableBuilder( + column: $table.name, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get type => $composableBuilder( + column: $table.type, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get createdAt => $composableBuilder( + column: $table.createdAt, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get updatedAt => $composableBuilder( + column: $table.updatedAt, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get width => $composableBuilder( + column: $table.width, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get height => $composableBuilder( + column: $table.height, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get durationInSeconds => $composableBuilder( + column: $table.durationInSeconds, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get id => $composableBuilder( + column: $table.id, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get albumId => $composableBuilder( + column: $table.albumId, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get checksum => $composableBuilder( + column: $table.checksum, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get isFavorite => $composableBuilder( + column: $table.isFavorite, + builder: (column) => i0.ColumnOrderings(column), + ); + + i0.ColumnOrderings get orientation => $composableBuilder( + column: $table.orientation, + builder: (column) => i0.ColumnOrderings(column), + ); +} + +class $$TrashedLocalAssetEntityTableAnnotationComposer + extends + i0.Composer { + $$TrashedLocalAssetEntityTableAnnotationComposer({ + required super.$db, + required super.$table, + super.joinBuilder, + super.$addJoinBuilderToRootComposer, + super.$removeJoinBuilderFromRootComposer, + }); + i0.GeneratedColumn get name => + $composableBuilder(column: $table.name, builder: (column) => column); + + i0.GeneratedColumnWithTypeConverter get type => + $composableBuilder(column: $table.type, builder: (column) => column); + + i0.GeneratedColumn get createdAt => + $composableBuilder(column: $table.createdAt, builder: (column) => column); + + i0.GeneratedColumn get updatedAt => + $composableBuilder(column: $table.updatedAt, builder: (column) => column); + + i0.GeneratedColumn get width => + $composableBuilder(column: $table.width, builder: (column) => column); + + i0.GeneratedColumn get height => + $composableBuilder(column: $table.height, builder: (column) => column); + + i0.GeneratedColumn get durationInSeconds => $composableBuilder( + column: $table.durationInSeconds, + builder: (column) => column, + ); + + i0.GeneratedColumn get id => + $composableBuilder(column: $table.id, builder: (column) => column); + + i0.GeneratedColumn get albumId => + $composableBuilder(column: $table.albumId, builder: (column) => column); + + i0.GeneratedColumn get checksum => + $composableBuilder(column: $table.checksum, builder: (column) => column); + + i0.GeneratedColumn get isFavorite => $composableBuilder( + column: $table.isFavorite, + builder: (column) => column, + ); + + i0.GeneratedColumn get orientation => $composableBuilder( + column: $table.orientation, + builder: (column) => column, + ); +} + +class $$TrashedLocalAssetEntityTableTableManager + extends + i0.RootTableManager< + i0.GeneratedDatabase, + i1.$TrashedLocalAssetEntityTable, + i1.TrashedLocalAssetEntityData, + i1.$$TrashedLocalAssetEntityTableFilterComposer, + i1.$$TrashedLocalAssetEntityTableOrderingComposer, + i1.$$TrashedLocalAssetEntityTableAnnotationComposer, + $$TrashedLocalAssetEntityTableCreateCompanionBuilder, + $$TrashedLocalAssetEntityTableUpdateCompanionBuilder, + ( + i1.TrashedLocalAssetEntityData, + i0.BaseReferences< + i0.GeneratedDatabase, + i1.$TrashedLocalAssetEntityTable, + i1.TrashedLocalAssetEntityData + >, + ), + i1.TrashedLocalAssetEntityData, + i0.PrefetchHooks Function() + > { + $$TrashedLocalAssetEntityTableTableManager( + i0.GeneratedDatabase db, + i1.$TrashedLocalAssetEntityTable table, + ) : super( + i0.TableManagerState( + db: db, + table: table, + createFilteringComposer: () => + i1.$$TrashedLocalAssetEntityTableFilterComposer( + $db: db, + $table: table, + ), + createOrderingComposer: () => + i1.$$TrashedLocalAssetEntityTableOrderingComposer( + $db: db, + $table: table, + ), + createComputedFieldComposer: () => + i1.$$TrashedLocalAssetEntityTableAnnotationComposer( + $db: db, + $table: table, + ), + updateCompanionCallback: + ({ + i0.Value name = const i0.Value.absent(), + i0.Value type = const i0.Value.absent(), + i0.Value createdAt = const i0.Value.absent(), + i0.Value updatedAt = const i0.Value.absent(), + i0.Value width = const i0.Value.absent(), + i0.Value height = const i0.Value.absent(), + i0.Value durationInSeconds = const i0.Value.absent(), + i0.Value id = const i0.Value.absent(), + i0.Value albumId = const i0.Value.absent(), + i0.Value checksum = const i0.Value.absent(), + i0.Value isFavorite = const i0.Value.absent(), + i0.Value orientation = const i0.Value.absent(), + }) => i1.TrashedLocalAssetEntityCompanion( + name: name, + type: type, + createdAt: createdAt, + updatedAt: updatedAt, + width: width, + height: height, + durationInSeconds: durationInSeconds, + id: id, + albumId: albumId, + checksum: checksum, + isFavorite: isFavorite, + orientation: orientation, + ), + createCompanionCallback: + ({ + required String name, + required i2.AssetType type, + i0.Value createdAt = const i0.Value.absent(), + i0.Value updatedAt = const i0.Value.absent(), + i0.Value width = const i0.Value.absent(), + i0.Value height = const i0.Value.absent(), + i0.Value durationInSeconds = const i0.Value.absent(), + required String id, + required String albumId, + i0.Value checksum = const i0.Value.absent(), + i0.Value isFavorite = const i0.Value.absent(), + i0.Value orientation = const i0.Value.absent(), + }) => i1.TrashedLocalAssetEntityCompanion.insert( + name: name, + type: type, + createdAt: createdAt, + updatedAt: updatedAt, + width: width, + height: height, + durationInSeconds: durationInSeconds, + id: id, + albumId: albumId, + checksum: checksum, + isFavorite: isFavorite, + orientation: orientation, + ), + withReferenceMapper: (p0) => p0 + .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) + .toList(), + prefetchHooksCallback: null, + ), + ); +} + +typedef $$TrashedLocalAssetEntityTableProcessedTableManager = + i0.ProcessedTableManager< + i0.GeneratedDatabase, + i1.$TrashedLocalAssetEntityTable, + i1.TrashedLocalAssetEntityData, + i1.$$TrashedLocalAssetEntityTableFilterComposer, + i1.$$TrashedLocalAssetEntityTableOrderingComposer, + i1.$$TrashedLocalAssetEntityTableAnnotationComposer, + $$TrashedLocalAssetEntityTableCreateCompanionBuilder, + $$TrashedLocalAssetEntityTableUpdateCompanionBuilder, + ( + i1.TrashedLocalAssetEntityData, + i0.BaseReferences< + i0.GeneratedDatabase, + i1.$TrashedLocalAssetEntityTable, + i1.TrashedLocalAssetEntityData + >, + ), + i1.TrashedLocalAssetEntityData, + i0.PrefetchHooks Function() + >; +i0.Index get idxTrashedLocalAssetChecksum => i0.Index( + 'idx_trashed_local_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', +); + +class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity + with + i0.TableInfo< + $TrashedLocalAssetEntityTable, + i1.TrashedLocalAssetEntityData + > { + @override + final i0.GeneratedDatabase attachedDatabase; + final String? _alias; + $TrashedLocalAssetEntityTable(this.attachedDatabase, [this._alias]); + static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta( + 'name', + ); + @override + late final i0.GeneratedColumn name = i0.GeneratedColumn( + 'name', + aliasedName, + false, + type: i0.DriftSqlType.string, + requiredDuringInsert: true, + ); + @override + late final i0.GeneratedColumnWithTypeConverter type = + i0.GeneratedColumn( + 'type', + aliasedName, + false, + type: i0.DriftSqlType.int, + requiredDuringInsert: true, + ).withConverter( + i1.$TrashedLocalAssetEntityTable.$convertertype, + ); + static const i0.VerificationMeta _createdAtMeta = const i0.VerificationMeta( + 'createdAt', + ); + @override + late final i0.GeneratedColumn createdAt = + i0.GeneratedColumn( + 'created_at', + aliasedName, + false, + type: i0.DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: i4.currentDateAndTime, + ); + static const i0.VerificationMeta _updatedAtMeta = const i0.VerificationMeta( + 'updatedAt', + ); + @override + late final i0.GeneratedColumn updatedAt = + i0.GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: i0.DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: i4.currentDateAndTime, + ); + static const i0.VerificationMeta _widthMeta = const i0.VerificationMeta( + 'width', + ); + @override + late final i0.GeneratedColumn width = i0.GeneratedColumn( + 'width', + aliasedName, + true, + type: i0.DriftSqlType.int, + requiredDuringInsert: false, + ); + static const i0.VerificationMeta _heightMeta = const i0.VerificationMeta( + 'height', + ); + @override + late final i0.GeneratedColumn height = i0.GeneratedColumn( + 'height', + aliasedName, + true, + type: i0.DriftSqlType.int, + requiredDuringInsert: false, + ); + static const i0.VerificationMeta _durationInSecondsMeta = + const i0.VerificationMeta('durationInSeconds'); + @override + late final i0.GeneratedColumn durationInSeconds = + i0.GeneratedColumn( + 'duration_in_seconds', + aliasedName, + true, + type: i0.DriftSqlType.int, + requiredDuringInsert: false, + ); + static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); + @override + late final i0.GeneratedColumn id = i0.GeneratedColumn( + 'id', + aliasedName, + false, + type: i0.DriftSqlType.string, + requiredDuringInsert: true, + ); + static const i0.VerificationMeta _albumIdMeta = const i0.VerificationMeta( + 'albumId', + ); + @override + late final i0.GeneratedColumn albumId = i0.GeneratedColumn( + 'album_id', + aliasedName, + false, + type: i0.DriftSqlType.string, + requiredDuringInsert: true, + ); + static const i0.VerificationMeta _checksumMeta = const i0.VerificationMeta( + 'checksum', + ); + @override + late final i0.GeneratedColumn checksum = i0.GeneratedColumn( + 'checksum', + aliasedName, + true, + type: i0.DriftSqlType.string, + requiredDuringInsert: false, + ); + static const i0.VerificationMeta _isFavoriteMeta = const i0.VerificationMeta( + 'isFavorite', + ); + @override + late final i0.GeneratedColumn isFavorite = i0.GeneratedColumn( + 'is_favorite', + aliasedName, + false, + type: i0.DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: i0.GeneratedColumn.constraintIsAlways( + 'CHECK ("is_favorite" IN (0, 1))', + ), + defaultValue: const i4.Constant(false), + ); + static const i0.VerificationMeta _orientationMeta = const i0.VerificationMeta( + 'orientation', + ); + @override + late final i0.GeneratedColumn orientation = i0.GeneratedColumn( + 'orientation', + aliasedName, + false, + type: i0.DriftSqlType.int, + requiredDuringInsert: false, + defaultValue: const i4.Constant(0), + ); + @override + List get $columns => [ + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + albumId, + checksum, + isFavorite, + orientation, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'trashed_local_asset_entity'; + @override + i0.VerificationContext validateIntegrity( + i0.Insertable instance, { + bool isInserting = false, + }) { + final context = i0.VerificationContext(); + final data = instance.toColumns(true); + if (data.containsKey('name')) { + context.handle( + _nameMeta, + name.isAcceptableOrUnknown(data['name']!, _nameMeta), + ); + } else if (isInserting) { + context.missing(_nameMeta); + } + if (data.containsKey('created_at')) { + context.handle( + _createdAtMeta, + createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), + ); + } + if (data.containsKey('updated_at')) { + context.handle( + _updatedAtMeta, + updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), + ); + } + if (data.containsKey('width')) { + context.handle( + _widthMeta, + width.isAcceptableOrUnknown(data['width']!, _widthMeta), + ); + } + if (data.containsKey('height')) { + context.handle( + _heightMeta, + height.isAcceptableOrUnknown(data['height']!, _heightMeta), + ); + } + if (data.containsKey('duration_in_seconds')) { + context.handle( + _durationInSecondsMeta, + durationInSeconds.isAcceptableOrUnknown( + data['duration_in_seconds']!, + _durationInSecondsMeta, + ), + ); + } + if (data.containsKey('id')) { + context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); + } else if (isInserting) { + context.missing(_idMeta); + } + if (data.containsKey('album_id')) { + context.handle( + _albumIdMeta, + albumId.isAcceptableOrUnknown(data['album_id']!, _albumIdMeta), + ); + } else if (isInserting) { + context.missing(_albumIdMeta); + } + if (data.containsKey('checksum')) { + context.handle( + _checksumMeta, + checksum.isAcceptableOrUnknown(data['checksum']!, _checksumMeta), + ); + } + if (data.containsKey('is_favorite')) { + context.handle( + _isFavoriteMeta, + isFavorite.isAcceptableOrUnknown(data['is_favorite']!, _isFavoriteMeta), + ); + } + if (data.containsKey('orientation')) { + context.handle( + _orientationMeta, + orientation.isAcceptableOrUnknown( + data['orientation']!, + _orientationMeta, + ), + ); + } + return context; + } + + @override + Set get $primaryKey => {id, albumId}; + @override + i1.TrashedLocalAssetEntityData map( + Map data, { + String? tablePrefix, + }) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return i1.TrashedLocalAssetEntityData( + name: attachedDatabase.typeMapping.read( + i0.DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + type: i1.$TrashedLocalAssetEntityTable.$convertertype.fromSql( + attachedDatabase.typeMapping.read( + i0.DriftSqlType.int, + data['${effectivePrefix}type'], + )!, + ), + createdAt: attachedDatabase.typeMapping.read( + i0.DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + i0.DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + width: attachedDatabase.typeMapping.read( + i0.DriftSqlType.int, + data['${effectivePrefix}width'], + ), + height: attachedDatabase.typeMapping.read( + i0.DriftSqlType.int, + data['${effectivePrefix}height'], + ), + durationInSeconds: attachedDatabase.typeMapping.read( + i0.DriftSqlType.int, + data['${effectivePrefix}duration_in_seconds'], + ), + id: attachedDatabase.typeMapping.read( + i0.DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + albumId: attachedDatabase.typeMapping.read( + i0.DriftSqlType.string, + data['${effectivePrefix}album_id'], + )!, + checksum: attachedDatabase.typeMapping.read( + i0.DriftSqlType.string, + data['${effectivePrefix}checksum'], + ), + isFavorite: attachedDatabase.typeMapping.read( + i0.DriftSqlType.bool, + data['${effectivePrefix}is_favorite'], + )!, + orientation: attachedDatabase.typeMapping.read( + i0.DriftSqlType.int, + data['${effectivePrefix}orientation'], + )!, + ); + } + + @override + $TrashedLocalAssetEntityTable createAlias(String alias) { + return $TrashedLocalAssetEntityTable(attachedDatabase, alias); + } + + static i0.JsonTypeConverter2 $convertertype = + const i0.EnumIndexConverter(i2.AssetType.values); + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class TrashedLocalAssetEntityData extends i0.DataClass + implements i0.Insertable { + final String name; + final i2.AssetType type; + final DateTime createdAt; + final DateTime updatedAt; + final int? width; + final int? height; + final int? durationInSeconds; + final String id; + final String albumId; + final String? checksum; + final bool isFavorite; + final int orientation; + const TrashedLocalAssetEntityData({ + required this.name, + required this.type, + required this.createdAt, + required this.updatedAt, + this.width, + this.height, + this.durationInSeconds, + required this.id, + required this.albumId, + this.checksum, + required this.isFavorite, + required this.orientation, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['name'] = i0.Variable(name); + { + map['type'] = i0.Variable( + i1.$TrashedLocalAssetEntityTable.$convertertype.toSql(type), + ); + } + map['created_at'] = i0.Variable(createdAt); + map['updated_at'] = i0.Variable(updatedAt); + if (!nullToAbsent || width != null) { + map['width'] = i0.Variable(width); + } + if (!nullToAbsent || height != null) { + map['height'] = i0.Variable(height); + } + if (!nullToAbsent || durationInSeconds != null) { + map['duration_in_seconds'] = i0.Variable(durationInSeconds); + } + map['id'] = i0.Variable(id); + map['album_id'] = i0.Variable(albumId); + if (!nullToAbsent || checksum != null) { + map['checksum'] = i0.Variable(checksum); + } + map['is_favorite'] = i0.Variable(isFavorite); + map['orientation'] = i0.Variable(orientation); + return map; + } + + factory TrashedLocalAssetEntityData.fromJson( + Map json, { + i0.ValueSerializer? serializer, + }) { + serializer ??= i0.driftRuntimeOptions.defaultSerializer; + return TrashedLocalAssetEntityData( + name: serializer.fromJson(json['name']), + type: i1.$TrashedLocalAssetEntityTable.$convertertype.fromJson( + serializer.fromJson(json['type']), + ), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + width: serializer.fromJson(json['width']), + height: serializer.fromJson(json['height']), + durationInSeconds: serializer.fromJson(json['durationInSeconds']), + id: serializer.fromJson(json['id']), + albumId: serializer.fromJson(json['albumId']), + checksum: serializer.fromJson(json['checksum']), + isFavorite: serializer.fromJson(json['isFavorite']), + orientation: serializer.fromJson(json['orientation']), + ); + } + @override + Map toJson({i0.ValueSerializer? serializer}) { + serializer ??= i0.driftRuntimeOptions.defaultSerializer; + return { + 'name': serializer.toJson(name), + 'type': serializer.toJson( + i1.$TrashedLocalAssetEntityTable.$convertertype.toJson(type), + ), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'width': serializer.toJson(width), + 'height': serializer.toJson(height), + 'durationInSeconds': serializer.toJson(durationInSeconds), + 'id': serializer.toJson(id), + 'albumId': serializer.toJson(albumId), + 'checksum': serializer.toJson(checksum), + 'isFavorite': serializer.toJson(isFavorite), + 'orientation': serializer.toJson(orientation), + }; + } + + i1.TrashedLocalAssetEntityData copyWith({ + String? name, + i2.AssetType? type, + DateTime? createdAt, + DateTime? updatedAt, + i0.Value width = const i0.Value.absent(), + i0.Value height = const i0.Value.absent(), + i0.Value durationInSeconds = const i0.Value.absent(), + String? id, + String? albumId, + i0.Value checksum = const i0.Value.absent(), + bool? isFavorite, + int? orientation, + }) => i1.TrashedLocalAssetEntityData( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width.present ? width.value : this.width, + height: height.present ? height.value : this.height, + durationInSeconds: durationInSeconds.present + ? durationInSeconds.value + : this.durationInSeconds, + id: id ?? this.id, + albumId: albumId ?? this.albumId, + checksum: checksum.present ? checksum.value : this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + orientation: orientation ?? this.orientation, + ); + TrashedLocalAssetEntityData copyWithCompanion( + i1.TrashedLocalAssetEntityCompanion data, + ) { + return TrashedLocalAssetEntityData( + name: data.name.present ? data.name.value : this.name, + type: data.type.present ? data.type.value : this.type, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + width: data.width.present ? data.width.value : this.width, + height: data.height.present ? data.height.value : this.height, + durationInSeconds: data.durationInSeconds.present + ? data.durationInSeconds.value + : this.durationInSeconds, + id: data.id.present ? data.id.value : this.id, + albumId: data.albumId.present ? data.albumId.value : this.albumId, + checksum: data.checksum.present ? data.checksum.value : this.checksum, + isFavorite: data.isFavorite.present + ? data.isFavorite.value + : this.isFavorite, + orientation: data.orientation.present + ? data.orientation.value + : this.orientation, + ); + } + + @override + String toString() { + return (StringBuffer('TrashedLocalAssetEntityData(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('albumId: $albumId, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('orientation: $orientation') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + albumId, + checksum, + isFavorite, + orientation, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is i1.TrashedLocalAssetEntityData && + other.name == this.name && + other.type == this.type && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.width == this.width && + other.height == this.height && + other.durationInSeconds == this.durationInSeconds && + other.id == this.id && + other.albumId == this.albumId && + other.checksum == this.checksum && + other.isFavorite == this.isFavorite && + other.orientation == this.orientation); +} + +class TrashedLocalAssetEntityCompanion + extends i0.UpdateCompanion { + final i0.Value name; + final i0.Value type; + final i0.Value createdAt; + final i0.Value updatedAt; + final i0.Value width; + final i0.Value height; + final i0.Value durationInSeconds; + final i0.Value id; + final i0.Value albumId; + final i0.Value checksum; + final i0.Value isFavorite; + final i0.Value orientation; + const TrashedLocalAssetEntityCompanion({ + this.name = const i0.Value.absent(), + this.type = const i0.Value.absent(), + this.createdAt = const i0.Value.absent(), + this.updatedAt = const i0.Value.absent(), + this.width = const i0.Value.absent(), + this.height = const i0.Value.absent(), + this.durationInSeconds = const i0.Value.absent(), + this.id = const i0.Value.absent(), + this.albumId = const i0.Value.absent(), + this.checksum = const i0.Value.absent(), + this.isFavorite = const i0.Value.absent(), + this.orientation = const i0.Value.absent(), + }); + TrashedLocalAssetEntityCompanion.insert({ + required String name, + required i2.AssetType type, + this.createdAt = const i0.Value.absent(), + this.updatedAt = const i0.Value.absent(), + this.width = const i0.Value.absent(), + this.height = const i0.Value.absent(), + this.durationInSeconds = const i0.Value.absent(), + required String id, + required String albumId, + this.checksum = const i0.Value.absent(), + this.isFavorite = const i0.Value.absent(), + this.orientation = const i0.Value.absent(), + }) : name = i0.Value(name), + type = i0.Value(type), + id = i0.Value(id), + albumId = i0.Value(albumId); + static i0.Insertable custom({ + i0.Expression? name, + i0.Expression? type, + i0.Expression? createdAt, + i0.Expression? updatedAt, + i0.Expression? width, + i0.Expression? height, + i0.Expression? durationInSeconds, + i0.Expression? id, + i0.Expression? albumId, + i0.Expression? checksum, + i0.Expression? isFavorite, + i0.Expression? orientation, + }) { + return i0.RawValuesInsertable({ + if (name != null) 'name': name, + if (type != null) 'type': type, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (width != null) 'width': width, + if (height != null) 'height': height, + if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, + if (id != null) 'id': id, + if (albumId != null) 'album_id': albumId, + if (checksum != null) 'checksum': checksum, + if (isFavorite != null) 'is_favorite': isFavorite, + if (orientation != null) 'orientation': orientation, + }); + } + + i1.TrashedLocalAssetEntityCompanion copyWith({ + i0.Value? name, + i0.Value? type, + i0.Value? createdAt, + i0.Value? updatedAt, + i0.Value? width, + i0.Value? height, + i0.Value? durationInSeconds, + i0.Value? id, + i0.Value? albumId, + i0.Value? checksum, + i0.Value? isFavorite, + i0.Value? orientation, + }) { + return i1.TrashedLocalAssetEntityCompanion( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width ?? this.width, + height: height ?? this.height, + durationInSeconds: durationInSeconds ?? this.durationInSeconds, + id: id ?? this.id, + albumId: albumId ?? this.albumId, + checksum: checksum ?? this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + orientation: orientation ?? this.orientation, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (name.present) { + map['name'] = i0.Variable(name.value); + } + if (type.present) { + map['type'] = i0.Variable( + i1.$TrashedLocalAssetEntityTable.$convertertype.toSql(type.value), + ); + } + if (createdAt.present) { + map['created_at'] = i0.Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = i0.Variable(updatedAt.value); + } + if (width.present) { + map['width'] = i0.Variable(width.value); + } + if (height.present) { + map['height'] = i0.Variable(height.value); + } + if (durationInSeconds.present) { + map['duration_in_seconds'] = i0.Variable(durationInSeconds.value); + } + if (id.present) { + map['id'] = i0.Variable(id.value); + } + if (albumId.present) { + map['album_id'] = i0.Variable(albumId.value); + } + if (checksum.present) { + map['checksum'] = i0.Variable(checksum.value); + } + if (isFavorite.present) { + map['is_favorite'] = i0.Variable(isFavorite.value); + } + if (orientation.present) { + map['orientation'] = i0.Variable(orientation.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('TrashedLocalAssetEntityCompanion(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('albumId: $albumId, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('orientation: $orientation') + ..write(')')) + .toString(); + } +} + +i0.Index get idxTrashedLocalAssetAlbum => i0.Index( + 'idx_trashed_local_asset_album', + 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', +); diff --git a/mobile/lib/infrastructure/repositories/db.repository.dart b/mobile/lib/infrastructure/repositories/db.repository.dart index 7291c3a97b..548aa2e384 100644 --- a/mobile/lib/infrastructure/repositories/db.repository.dart +++ b/mobile/lib/infrastructure/repositories/db.repository.dart @@ -10,6 +10,7 @@ import 'package:immich_mobile/infrastructure/entities/exif.entity.dart'; import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart'; import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.dart'; import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart'; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart'; import 'package:immich_mobile/infrastructure/entities/memory.entity.dart'; import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.dart'; import 'package:immich_mobile/infrastructure/entities/partner.entity.dart'; @@ -62,6 +63,7 @@ class IsarDatabaseRepository implements IDatabaseRepository { PersonEntity, AssetFaceEntity, StoreEntity, + TrashedLocalAssetEntity, ], include: {'package:immich_mobile/infrastructure/entities/merged_asset.drift'}, ) @@ -93,7 +95,7 @@ class Drift extends $Drift implements IDatabaseRepository { } @override - int get schemaVersion => 12; + int get schemaVersion => 13; @override MigrationStrategy get migration => MigrationStrategy( @@ -178,6 +180,11 @@ class Drift extends $Drift implements IDatabaseRepository { ); } }, + from12To13: (m, v13) async { + await m.create(v13.trashedLocalAssetEntity); + await m.createIndex(v13.idxTrashedLocalAssetChecksum); + await m.createIndex(v13.idxTrashedLocalAssetAlbum); + }, ), ); diff --git a/mobile/lib/infrastructure/repositories/db.repository.drift.dart b/mobile/lib/infrastructure/repositories/db.repository.drift.dart index e39ed8a560..bd72da949c 100644 --- a/mobile/lib/infrastructure/repositories/db.repository.drift.dart +++ b/mobile/lib/infrastructure/repositories/db.repository.drift.dart @@ -37,9 +37,11 @@ import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.da as i17; import 'package:immich_mobile/infrastructure/entities/store.entity.drift.dart' as i18; -import 'package:immich_mobile/infrastructure/entities/merged_asset.drift.dart' +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart' as i19; -import 'package:drift/internal/modular.dart' as i20; +import 'package:immich_mobile/infrastructure/entities/merged_asset.drift.dart' + as i20; +import 'package:drift/internal/modular.dart' as i21; abstract class $Drift extends i0.GeneratedDatabase { $Drift(i0.QueryExecutor e) : super(e); @@ -77,9 +79,11 @@ abstract class $Drift extends i0.GeneratedDatabase { late final i17.$AssetFaceEntityTable assetFaceEntity = i17 .$AssetFaceEntityTable(this); late final i18.$StoreEntityTable storeEntity = i18.$StoreEntityTable(this); - i19.MergedAssetDrift get mergedAssetDrift => i20.ReadDatabaseContainer( + late final i19.$TrashedLocalAssetEntityTable trashedLocalAssetEntity = i19 + .$TrashedLocalAssetEntityTable(this); + i20.MergedAssetDrift get mergedAssetDrift => i21.ReadDatabaseContainer( this, - ).accessor(i19.MergedAssetDrift.new); + ).accessor(i20.MergedAssetDrift.new); @override Iterable> get allTables => allSchemaEntities.whereType>(); @@ -108,7 +112,10 @@ abstract class $Drift extends i0.GeneratedDatabase { personEntity, assetFaceEntity, storeEntity, + trashedLocalAssetEntity, i11.idxLatLng, + i19.idxTrashedLocalAssetChecksum, + i19.idxTrashedLocalAssetAlbum, ]; @override i0.StreamQueryUpdateRules @@ -336,4 +343,9 @@ class $DriftManager { i17.$$AssetFaceEntityTableTableManager(_db, _db.assetFaceEntity); i18.$$StoreEntityTableTableManager get storeEntity => i18.$$StoreEntityTableTableManager(_db, _db.storeEntity); + i19.$$TrashedLocalAssetEntityTableTableManager get trashedLocalAssetEntity => + i19.$$TrashedLocalAssetEntityTableTableManager( + _db, + _db.trashedLocalAssetEntity, + ); } diff --git a/mobile/lib/infrastructure/repositories/db.repository.steps.dart b/mobile/lib/infrastructure/repositories/db.repository.steps.dart index c973cd6f13..f2d87a7f83 100644 --- a/mobile/lib/infrastructure/repositories/db.repository.steps.dart +++ b/mobile/lib/infrastructure/repositories/db.repository.steps.dart @@ -5037,6 +5037,454 @@ final class Schema12 extends i0.VersionedSchema { ); } +final class Schema13 extends i0.VersionedSchema { + Schema13({required super.database}) : super(version: 13); + @override + late final List entities = [ + userEntity, + remoteAssetEntity, + stackEntity, + localAssetEntity, + remoteAlbumEntity, + localAlbumEntity, + localAlbumAssetEntity, + idxLocalAssetChecksum, + idxRemoteAssetOwnerChecksum, + uQRemoteAssetsOwnerChecksum, + uQRemoteAssetsOwnerLibraryChecksum, + idxRemoteAssetChecksum, + authUserEntity, + userMetadataEntity, + partnerEntity, + remoteExifEntity, + remoteAlbumAssetEntity, + remoteAlbumUserEntity, + memoryEntity, + memoryAssetEntity, + personEntity, + assetFaceEntity, + storeEntity, + trashedLocalAssetEntity, + idxLatLng, + idxTrashedLocalAssetChecksum, + idxTrashedLocalAssetAlbum, + ]; + late final Shape20 userEntity = Shape20( + source: i0.VersionedTable( + entityName: 'user_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_1, + _column_3, + _column_84, + _column_85, + _column_91, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape17 remoteAssetEntity = Shape17( + source: i0.VersionedTable( + entityName: 'remote_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_1, + _column_8, + _column_9, + _column_5, + _column_10, + _column_11, + _column_12, + _column_0, + _column_13, + _column_14, + _column_15, + _column_16, + _column_17, + _column_18, + _column_19, + _column_20, + _column_21, + _column_86, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape3 stackEntity = Shape3( + source: i0.VersionedTable( + entityName: 'stack_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [_column_0, _column_9, _column_5, _column_15, _column_75], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape2 localAssetEntity = Shape2( + source: i0.VersionedTable( + entityName: 'local_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_1, + _column_8, + _column_9, + _column_5, + _column_10, + _column_11, + _column_12, + _column_0, + _column_22, + _column_14, + _column_23, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape9 remoteAlbumEntity = Shape9( + source: i0.VersionedTable( + entityName: 'remote_album_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_1, + _column_56, + _column_9, + _column_5, + _column_15, + _column_57, + _column_58, + _column_59, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape19 localAlbumEntity = Shape19( + source: i0.VersionedTable( + entityName: 'local_album_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_1, + _column_5, + _column_31, + _column_32, + _column_90, + _column_33, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape22 localAlbumAssetEntity = Shape22( + source: i0.VersionedTable( + entityName: 'local_album_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id, album_id)'], + columns: [_column_34, _column_35, _column_33], + attachedDatabase: database, + ), + alias: null, + ); + final i1.Index idxLocalAssetChecksum = i1.Index( + 'idx_local_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', + ); + final i1.Index idxRemoteAssetOwnerChecksum = i1.Index( + 'idx_remote_asset_owner_checksum', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', + ); + final i1.Index uQRemoteAssetsOwnerChecksum = i1.Index( + 'UQ_remote_assets_owner_checksum', + 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', + ); + final i1.Index uQRemoteAssetsOwnerLibraryChecksum = i1.Index( + 'UQ_remote_assets_owner_library_checksum', + 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', + ); + final i1.Index idxRemoteAssetChecksum = i1.Index( + 'idx_remote_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', + ); + late final Shape21 authUserEntity = Shape21( + source: i0.VersionedTable( + entityName: 'auth_user_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_1, + _column_3, + _column_2, + _column_84, + _column_85, + _column_92, + _column_93, + _column_7, + _column_94, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape4 userMetadataEntity = Shape4( + source: i0.VersionedTable( + entityName: 'user_metadata_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(user_id, "key")'], + columns: [_column_25, _column_26, _column_27], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape5 partnerEntity = Shape5( + source: i0.VersionedTable( + entityName: 'partner_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(shared_by_id, shared_with_id)'], + columns: [_column_28, _column_29, _column_30], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape8 remoteExifEntity = Shape8( + source: i0.VersionedTable( + entityName: 'remote_exif_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id)'], + columns: [ + _column_36, + _column_37, + _column_38, + _column_39, + _column_40, + _column_41, + _column_11, + _column_10, + _column_42, + _column_43, + _column_44, + _column_45, + _column_46, + _column_47, + _column_48, + _column_49, + _column_50, + _column_51, + _column_52, + _column_53, + _column_54, + _column_55, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape7 remoteAlbumAssetEntity = Shape7( + source: i0.VersionedTable( + entityName: 'remote_album_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id, album_id)'], + columns: [_column_36, _column_60], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape10 remoteAlbumUserEntity = Shape10( + source: i0.VersionedTable( + entityName: 'remote_album_user_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(album_id, user_id)'], + columns: [_column_60, _column_25, _column_61], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape11 memoryEntity = Shape11( + source: i0.VersionedTable( + entityName: 'memory_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_9, + _column_5, + _column_18, + _column_15, + _column_8, + _column_62, + _column_63, + _column_64, + _column_65, + _column_66, + _column_67, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape12 memoryAssetEntity = Shape12( + source: i0.VersionedTable( + entityName: 'memory_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(asset_id, memory_id)'], + columns: [_column_36, _column_68], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape14 personEntity = Shape14( + source: i0.VersionedTable( + entityName: 'person_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_9, + _column_5, + _column_15, + _column_1, + _column_69, + _column_71, + _column_72, + _column_73, + _column_74, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape15 assetFaceEntity = Shape15( + source: i0.VersionedTable( + entityName: 'asset_face_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [ + _column_0, + _column_36, + _column_76, + _column_77, + _column_78, + _column_79, + _column_80, + _column_81, + _column_82, + _column_83, + ], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape18 storeEntity = Shape18( + source: i0.VersionedTable( + entityName: 'store_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id)'], + columns: [_column_87, _column_88, _column_89], + attachedDatabase: database, + ), + alias: null, + ); + late final Shape23 trashedLocalAssetEntity = Shape23( + source: i0.VersionedTable( + entityName: 'trashed_local_asset_entity', + withoutRowId: true, + isStrict: true, + tableConstraints: ['PRIMARY KEY(id, album_id)'], + columns: [ + _column_1, + _column_8, + _column_9, + _column_5, + _column_10, + _column_11, + _column_12, + _column_0, + _column_95, + _column_22, + _column_14, + _column_23, + ], + attachedDatabase: database, + ), + alias: null, + ); + final i1.Index idxLatLng = i1.Index( + 'idx_lat_lng', + 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', + ); + final i1.Index idxTrashedLocalAssetChecksum = i1.Index( + 'idx_trashed_local_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', + ); + final i1.Index idxTrashedLocalAssetAlbum = i1.Index( + 'idx_trashed_local_asset_album', + 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', + ); +} + +class Shape23 extends i0.VersionedTable { + Shape23({required super.source, required super.alias}) : super.aliased(); + i1.GeneratedColumn get name => + columnsByName['name']! as i1.GeneratedColumn; + i1.GeneratedColumn get type => + columnsByName['type']! as i1.GeneratedColumn; + i1.GeneratedColumn get createdAt => + columnsByName['created_at']! as i1.GeneratedColumn; + i1.GeneratedColumn get updatedAt => + columnsByName['updated_at']! as i1.GeneratedColumn; + i1.GeneratedColumn get width => + columnsByName['width']! as i1.GeneratedColumn; + i1.GeneratedColumn get height => + columnsByName['height']! as i1.GeneratedColumn; + i1.GeneratedColumn get durationInSeconds => + columnsByName['duration_in_seconds']! as i1.GeneratedColumn; + i1.GeneratedColumn get id => + columnsByName['id']! as i1.GeneratedColumn; + i1.GeneratedColumn get albumId => + columnsByName['album_id']! as i1.GeneratedColumn; + i1.GeneratedColumn get checksum => + columnsByName['checksum']! as i1.GeneratedColumn; + i1.GeneratedColumn get isFavorite => + columnsByName['is_favorite']! as i1.GeneratedColumn; + i1.GeneratedColumn get orientation => + columnsByName['orientation']! as i1.GeneratedColumn; +} + +i1.GeneratedColumn _column_95(String aliasedName) => + i1.GeneratedColumn( + 'album_id', + aliasedName, + false, + type: i1.DriftSqlType.string, + ); i0.MigrationStepWithVersion migrationSteps({ required Future Function(i1.Migrator m, Schema2 schema) from1To2, required Future Function(i1.Migrator m, Schema3 schema) from2To3, @@ -5049,6 +5497,7 @@ i0.MigrationStepWithVersion migrationSteps({ required Future Function(i1.Migrator m, Schema10 schema) from9To10, required Future Function(i1.Migrator m, Schema11 schema) from10To11, required Future Function(i1.Migrator m, Schema12 schema) from11To12, + required Future Function(i1.Migrator m, Schema13 schema) from12To13, }) { return (currentVersion, database) async { switch (currentVersion) { @@ -5107,6 +5556,11 @@ i0.MigrationStepWithVersion migrationSteps({ final migrator = i1.Migrator(database, schema); await from11To12(migrator, schema); return 12; + case 12: + final schema = Schema13(database: database); + final migrator = i1.Migrator(database, schema); + await from12To13(migrator, schema); + return 13; default: throw ArgumentError.value('Unknown migration from $currentVersion'); } @@ -5125,6 +5579,7 @@ i1.OnUpgrade stepByStep({ required Future Function(i1.Migrator m, Schema10 schema) from9To10, required Future Function(i1.Migrator m, Schema11 schema) from10To11, required Future Function(i1.Migrator m, Schema12 schema) from11To12, + required Future Function(i1.Migrator m, Schema13 schema) from12To13, }) => i0.VersionedSchema.stepByStepHelper( step: migrationSteps( from1To2: from1To2, @@ -5138,5 +5593,6 @@ i1.OnUpgrade stepByStep({ from9To10: from9To10, from10To11: from10To11, from11To12: from11To12, + from12To13: from12To13, ), ); diff --git a/mobile/lib/infrastructure/repositories/local_asset.repository.dart b/mobile/lib/infrastructure/repositories/local_asset.repository.dart index 2b76472c9e..4d30e09716 100644 --- a/mobile/lib/infrastructure/repositories/local_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/local_asset.repository.dart @@ -1,4 +1,6 @@ +import 'package:collection/collection.dart'; import 'package:drift/drift.dart'; +import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/album/local_album.model.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart'; @@ -8,6 +10,7 @@ import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; class DriftLocalAssetRepository extends DriftDatabaseRepository { final Drift _db; + const DriftLocalAssetRepository(this._db) : super(_db); SingleOrNullSelectable _assetSelectable(String id) { @@ -95,4 +98,32 @@ class DriftLocalAssetRepository extends DriftDatabaseRepository { } return query.map((localAlbum) => localAlbum.toDto()).get(); } + + Future>> getAssetsFromBackupAlbums(Iterable checksums) async { + if (checksums.isEmpty) { + return {}; + } + + final result = >{}; + + for (final slice in checksums.toSet().slices(kDriftMaxChunk)) { + final rows = + await (_db.select(_db.localAlbumAssetEntity).join([ + innerJoin(_db.localAlbumEntity, _db.localAlbumAssetEntity.albumId.equalsExp(_db.localAlbumEntity.id)), + innerJoin(_db.localAssetEntity, _db.localAlbumAssetEntity.assetId.equalsExp(_db.localAssetEntity.id)), + ])..where( + _db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected) & + _db.localAssetEntity.checksum.isIn(slice), + )) + .get(); + + for (final row in rows) { + final albumId = row.readTable(_db.localAlbumAssetEntity).albumId; + final assetData = row.readTable(_db.localAssetEntity); + final asset = assetData.toDto(); + (result[albumId] ??= []).add(asset); + } + } + return result; + } } diff --git a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart index be55c21afc..96c204ea0e 100644 --- a/mobile/lib/infrastructure/repositories/remote_asset.repository.dart +++ b/mobile/lib/infrastructure/repositories/remote_asset.repository.dart @@ -12,6 +12,7 @@ import 'package:maplibre_gl/maplibre_gl.dart'; class RemoteAssetRepository extends DriftDatabaseRepository { final Drift _db; + const RemoteAssetRepository(this._db) : super(_db); /// For testing purposes diff --git a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart new file mode 100644 index 0000000000..498e4227b7 --- /dev/null +++ b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart @@ -0,0 +1,252 @@ +import 'package:collection/collection.dart'; +import 'package:drift/drift.dart'; +import 'package:immich_mobile/constants/constants.dart'; +import 'package:immich_mobile/domain/models/album/local_album.model.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart'; +import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart'; +import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; + +typedef TrashedAsset = ({String albumId, LocalAsset asset}); + +class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository { + final Drift _db; + + const DriftTrashedLocalAssetRepository(this._db) : super(_db); + + Future updateHashes(Map hashes) { + if (hashes.isEmpty) { + return Future.value(); + } + return _db.batch((batch) async { + for (final entry in hashes.entries) { + batch.update( + _db.trashedLocalAssetEntity, + TrashedLocalAssetEntityCompanion(checksum: Value(entry.value)), + where: (e) => e.id.equals(entry.key), + ); + } + }); + } + + Future> getAssetsToHash(Iterable albumIds) { + final query = _db.trashedLocalAssetEntity.select()..where((r) => r.albumId.isIn(albumIds) & r.checksum.isNull()); + return query.map((row) => row.toLocalAsset()).get(); + } + + Future> getToRestore() async { + final selectedAlbumIds = (_db.selectOnly(_db.localAlbumEntity) + ..addColumns([_db.localAlbumEntity.id]) + ..where(_db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected))); + + final rows = + await (_db.select(_db.trashedLocalAssetEntity).join([ + innerJoin( + _db.remoteAssetEntity, + _db.remoteAssetEntity.checksum.equalsExp(_db.trashedLocalAssetEntity.checksum), + ), + ])..where( + _db.trashedLocalAssetEntity.albumId.isInQuery(selectedAlbumIds) & + _db.remoteAssetEntity.deletedAt.isNull(), + )) + .get(); + + return rows.map((result) => result.readTable(_db.trashedLocalAssetEntity).toLocalAsset()); + } + + /// Applies resulted snapshot of trashed assets: + /// - upserts incoming rows + /// - deletes rows that are not present in the snapshot + Future processTrashSnapshot(Iterable trashedAssets) async { + if (trashedAssets.isEmpty) { + await _db.delete(_db.trashedLocalAssetEntity).go(); + return; + } + final assetIds = trashedAssets.map((e) => e.asset.id).toSet(); + Map localChecksumById = await _getCachedChecksums(assetIds); + + return _db.transaction(() async { + await _db.batch((batch) { + for (final item in trashedAssets) { + final effectiveChecksum = localChecksumById[item.asset.id] ?? item.asset.checksum; + final companion = TrashedLocalAssetEntityCompanion.insert( + id: item.asset.id, + albumId: item.albumId, + checksum: Value(effectiveChecksum), + name: item.asset.name, + type: item.asset.type, + createdAt: Value(item.asset.createdAt), + updatedAt: Value(item.asset.updatedAt), + width: Value(item.asset.width), + height: Value(item.asset.height), + durationInSeconds: Value(item.asset.durationInSeconds), + isFavorite: Value(item.asset.isFavorite), + orientation: Value(item.asset.orientation), + ); + + batch.insert<$TrashedLocalAssetEntityTable, TrashedLocalAssetEntityData>( + _db.trashedLocalAssetEntity, + companion, + onConflict: DoUpdate((_) => companion, where: (old) => old.updatedAt.isNotValue(item.asset.updatedAt)), + ); + } + }); + + if (assetIds.length <= kDriftMaxChunk) { + await (_db.delete(_db.trashedLocalAssetEntity)..where((row) => row.id.isNotIn(assetIds))).go(); + } else { + final existingIds = await (_db.selectOnly( + _db.trashedLocalAssetEntity, + )..addColumns([_db.trashedLocalAssetEntity.id])).map((r) => r.read(_db.trashedLocalAssetEntity.id)!).get(); + final idToDelete = existingIds.where((id) => !assetIds.contains(id)); + for (final slice in idToDelete.slices(kDriftMaxChunk)) { + await (_db.delete(_db.trashedLocalAssetEntity)..where((t) => t.id.isIn(slice))).go(); + } + } + }); + } + + Stream watchCount() { + return (_db.selectOnly(_db.trashedLocalAssetEntity)..addColumns([_db.trashedLocalAssetEntity.id.count()])) + .watchSingle() + .map((row) => row.read(_db.trashedLocalAssetEntity.id.count()) ?? 0); + } + + Stream watchHashedCount() { + return (_db.selectOnly(_db.trashedLocalAssetEntity) + ..addColumns([_db.trashedLocalAssetEntity.id.count()]) + ..where(_db.trashedLocalAssetEntity.checksum.isNotNull())) + .watchSingle() + .map((row) => row.read(_db.trashedLocalAssetEntity.id.count()) ?? 0); + } + + Future trashLocalAsset(Map> assetsByAlbums) async { + if (assetsByAlbums.isEmpty) { + return; + } + + final companions = []; + final idToDelete = {}; + + for (final entry in assetsByAlbums.entries) { + for (final asset in entry.value) { + idToDelete.add(asset.id); + companions.add( + TrashedLocalAssetEntityCompanion( + id: Value(asset.id), + name: Value(asset.name), + albumId: Value(entry.key), + checksum: Value(asset.checksum), + type: Value(asset.type), + width: Value(asset.width), + height: Value(asset.height), + durationInSeconds: Value(asset.durationInSeconds), + isFavorite: Value(asset.isFavorite), + orientation: Value(asset.orientation), + createdAt: Value(asset.createdAt), + updatedAt: Value(asset.updatedAt), + ), + ); + } + } + + await _db.transaction(() async { + for (final companion in companions) { + await _db.into(_db.trashedLocalAssetEntity).insertOnConflictUpdate(companion); + } + + for (final slice in idToDelete.slices(kDriftMaxChunk)) { + await (_db.delete(_db.localAssetEntity)..where((t) => t.id.isIn(slice))).go(); + } + }); + } + + Future applyRestoredAssets(List idList) async { + if (idList.isEmpty) { + return; + } + + final trashedAssets = []; + + for (final slice in idList.slices(kDriftMaxChunk)) { + final q = _db.select(_db.trashedLocalAssetEntity)..where((t) => t.id.isIn(slice)); + trashedAssets.addAll(await q.get()); + } + + if (trashedAssets.isEmpty) { + return; + } + + final companions = trashedAssets.map((e) { + return LocalAssetEntityCompanion.insert( + id: e.id, + name: e.name, + type: e.type, + createdAt: Value(e.createdAt), + updatedAt: Value(e.updatedAt), + width: Value(e.width), + height: Value(e.height), + durationInSeconds: Value(e.durationInSeconds), + checksum: Value(e.checksum), + isFavorite: Value(e.isFavorite), + orientation: Value(e.orientation), + ); + }); + + await _db.transaction(() async { + for (final companion in companions) { + await _db.into(_db.localAssetEntity).insertOnConflictUpdate(companion); + } + for (final slice in idList.slices(kDriftMaxChunk)) { + await (_db.delete(_db.trashedLocalAssetEntity)..where((t) => t.id.isIn(slice))).go(); + } + }); + } + + Future>> getToTrash() async { + final result = >{}; + + final rows = + await (_db.select(_db.localAlbumAssetEntity).join([ + innerJoin(_db.localAlbumEntity, _db.localAlbumAssetEntity.albumId.equalsExp(_db.localAlbumEntity.id)), + innerJoin(_db.localAssetEntity, _db.localAlbumAssetEntity.assetId.equalsExp(_db.localAssetEntity.id)), + leftOuterJoin( + _db.remoteAssetEntity, + _db.remoteAssetEntity.checksum.equalsExp(_db.localAssetEntity.checksum), + ), + ])..where( + _db.localAlbumEntity.backupSelection.equalsValue(BackupSelection.selected) & + _db.remoteAssetEntity.deletedAt.isNotNull(), + )) + .get(); + + for (final row in rows) { + final albumId = row.readTable(_db.localAlbumAssetEntity).albumId; + final asset = row.readTable(_db.localAssetEntity).toDto(); + (result[albumId] ??= []).add(asset); + } + + return result; + } + + //attempt to reuse existing checksums + Future> _getCachedChecksums(Set assetIds) async { + final localChecksumById = {}; + + for (final slice in assetIds.slices(kDriftMaxChunk)) { + final rows = + await (_db.selectOnly(_db.localAssetEntity) + ..where(_db.localAssetEntity.id.isIn(slice) & _db.localAssetEntity.checksum.isNotNull()) + ..addColumns([_db.localAssetEntity.id, _db.localAssetEntity.checksum])) + .get(); + + for (final r in rows) { + localChecksumById[r.read(_db.localAssetEntity.id)!] = r.read(_db.localAssetEntity.checksum)!; + } + } + + return localChecksumById; + } +} diff --git a/mobile/lib/pages/common/splash_screen.page.dart b/mobile/lib/pages/common/splash_screen.page.dart index c1d621f474..79db33104d 100644 --- a/mobile/lib/pages/common/splash_screen.page.dart +++ b/mobile/lib/pages/common/splash_screen.page.dart @@ -65,7 +65,7 @@ class SplashScreenPageState extends ConsumerState { if (Store.isBetaTimelineEnabled) { bool syncSuccess = false; await Future.wait([ - backgroundManager.syncLocal(), + backgroundManager.syncLocal(full: true), backgroundManager.syncRemote().then((success) => syncSuccess = success), ]); diff --git a/mobile/lib/pages/common/tab_shell.page.dart b/mobile/lib/pages/common/tab_shell.page.dart index c4bf19fe34..bbb567bd3b 100644 --- a/mobile/lib/pages/common/tab_shell.page.dart +++ b/mobile/lib/pages/common/tab_shell.page.dart @@ -4,6 +4,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/constants/constants.dart'; import 'package:immich_mobile/domain/models/timeline.model.dart'; import 'package:immich_mobile/domain/utils/event_stream.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; @@ -107,30 +108,30 @@ class _TabShellPageState extends ConsumerState { void _onNavigationSelected(TabsRouter router, int index, WidgetRef ref) { // On Photos page menu tapped - if (router.activeIndex == 0 && index == 0) { + if (router.activeIndex == kPhotoTabIndex && index == kPhotoTabIndex) { EventStream.shared.emit(const ScrollToTopEvent()); } - if (index == 0) { + if (index == kPhotoTabIndex) { ref.invalidate(driftMemoryFutureProvider); } - if (router.activeIndex != 1 && index == 1) { + if (router.activeIndex != kSearchTabIndex && index == kSearchTabIndex) { ref.read(searchPreFilterProvider.notifier).clear(); } // On Search page tapped - if (router.activeIndex == 1 && index == 1) { + if (router.activeIndex == kSearchTabIndex && index == kSearchTabIndex) { ref.read(searchInputFocusProvider).requestFocus(); } // Album page - if (index == 2) { + if (index == kAlbumTabIndex) { ref.read(remoteAlbumProvider.notifier).refresh(); } // Library page - if (index == 3) { + if (index == kLibraryTabIndex) { ref.invalidate(localAlbumProvider); ref.invalidate(driftGetAllPeopleProvider); } diff --git a/mobile/lib/platform/native_sync_api.g.dart b/mobile/lib/platform/native_sync_api.g.dart index 8e4b900292..34ed7a5e2b 100644 --- a/mobile/lib/platform/native_sync_api.g.dart +++ b/mobile/lib/platform/native_sync_api.g.dart @@ -562,4 +562,32 @@ class NativeSyncApi { return; } } + + Future>> getTrashedAssets() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getTrashedAssets$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as Map?)!.cast>(); + } + } } diff --git a/mobile/lib/presentation/pages/drift_activities.page.dart b/mobile/lib/presentation/pages/drift_activities.page.dart index 30e7dd497a..b92d429aa1 100644 --- a/mobile/lib/presentation/pages/drift_activities.page.dart +++ b/mobile/lib/presentation/pages/drift_activities.page.dart @@ -3,21 +3,13 @@ import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart' hide Store; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/album/album.model.dart'; -import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/extensions/datetime_extensions.dart'; -import 'package:immich_mobile/models/activities/activity.model.dart'; +import 'package:immich_mobile/widgets/activities/comment_bubble.dart'; import 'package:immich_mobile/presentation/widgets/action_buttons/like_activity_action_button.widget.dart'; import 'package:immich_mobile/presentation/widgets/album/drift_activity_text_field.dart'; import 'package:immich_mobile/providers/activity.provider.dart'; -import 'package:immich_mobile/providers/activity_service.provider.dart'; -import 'package:immich_mobile/providers/image/immich_remote_thumbnail_provider.dart'; -import 'package:immich_mobile/providers/infrastructure/asset_viewer/current_asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/current_album.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/widgets/activities/dismissible_activity.dart'; -import 'package:immich_mobile/widgets/common/user_circle_avatar.dart'; @RoutePage() class DriftActivitiesPage extends HookConsumerWidget { @@ -27,10 +19,8 @@ class DriftActivitiesPage extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final asset = ref.read(currentAssetNotifier) as RemoteAsset?; - - final activityNotifier = ref.read(albumActivityProvider(album.id, asset?.id).notifier); - final activities = ref.watch(albumActivityProvider(album.id, asset?.id)); + final activityNotifier = ref.read(albumActivityProvider(album.id).notifier); + final activities = ref.watch(albumActivityProvider(album.id)); final listViewScrollController = useScrollController(); void scrollToBottom() { @@ -46,7 +36,7 @@ class DriftActivitiesPage extends HookConsumerWidget { overrides: [currentRemoteAlbumScopedProvider.overrideWithValue(album)], child: Scaffold( appBar: AppBar( - title: asset == null ? Text(album.name) : null, + title: Text(album.name), actions: [const LikeActivityActionButton(menuItem: true)], actionsPadding: const EdgeInsets.only(right: 8), ), @@ -57,7 +47,7 @@ class DriftActivitiesPage extends HookConsumerWidget { activityWidgets.add( Padding( padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6), - child: _CommentBubble(activity: activity), + child: CommentBubble(activity: activity), ), ); } @@ -91,139 +81,3 @@ class DriftActivitiesPage extends HookConsumerWidget { ); } } - -class _CommentBubble extends ConsumerWidget { - final Activity activity; - - const _CommentBubble({required this.activity}); - - @override - Widget build(BuildContext context, WidgetRef ref) { - final user = ref.watch(currentUserProvider); - final album = ref.watch(currentRemoteAlbumProvider)!; - final isOwn = activity.user.id == user?.id; - final canDelete = isOwn || album.ownerId == user?.id; - final hasAsset = activity.assetId != null && activity.assetId!.isNotEmpty; - final isLike = activity.type == ActivityType.like; - final bgColor = isOwn ? context.colorScheme.primaryContainer : context.colorScheme.surfaceContainer; - - final activityNotifier = ref.read(albumActivityProvider(album.id, activity.assetId).notifier); - - Future openAssetViewer() async { - final activityService = ref.read(activityServiceProvider); - final route = await activityService.buildAssetViewerRoute(activity.assetId!, ref); - if (route != null) await context.pushRoute(route); - } - - Widget avatar() { - if (isOwn) { - return const SizedBox.shrink(); - } - - return UserCircleAvatar(user: activity.user, size: 28, radius: 14); - } - - Widget? thumbnail() { - if (!hasAsset) { - return null; - } - - return ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 150, maxHeight: 150), - child: Stack( - children: [ - GestureDetector( - onTap: openAssetViewer, - child: ClipRRect( - borderRadius: const BorderRadius.all(Radius.circular(10)), - child: Image( - image: ImmichRemoteThumbnailProvider(assetId: activity.assetId!), - fit: BoxFit.cover, - ), - ), - ), - if (isLike) - Positioned( - right: 6, - bottom: 6, - child: Container( - padding: const EdgeInsets.all(4), - decoration: BoxDecoration(color: Colors.white.withValues(alpha: 0.7), shape: BoxShape.circle), - child: Icon(Icons.favorite, color: Colors.red[600], size: 18), - ), - ), - ], - ), - ); - } - - // Likes Album widget (for likes without asset) - Widget? likesToAlbum() { - if (!isLike || hasAsset) { - return null; - } - - return Container( - padding: const EdgeInsets.all(8), - decoration: BoxDecoration(color: Colors.white.withValues(alpha: 0.7), shape: BoxShape.circle), - child: Icon(Icons.favorite, color: Colors.red[600], size: 18), - ); - } - - Widget? commentBubble() { - if (activity.comment == null || activity.comment!.isEmpty) { - return null; - } - - return ConstrainedBox( - constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.5), - child: Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration(color: bgColor, borderRadius: const BorderRadius.all(Radius.circular(12))), - child: Text( - activity.comment ?? '', - style: context.textTheme.bodyLarge?.copyWith(color: context.colorScheme.onSurface), - ), - ), - ); - } - - // Combined content widgets - final List contentChildren = [thumbnail(), likesToAlbum(), commentBubble()].whereType().toList(); - - return DismissibleActivity( - onDismiss: canDelete ? (id) async => await activityNotifier.removeActivity(id) : null, - activity.id, - Align( - alignment: isOwn ? Alignment.centerRight : Alignment.centerLeft, - child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.86), - child: Container( - margin: const EdgeInsets.symmetric(vertical: 6, horizontal: 10), - child: Row( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (!isOwn) ...[avatar(), const SizedBox(width: 8)], - // Content column - Column( - crossAxisAlignment: isOwn ? CrossAxisAlignment.end : CrossAxisAlignment.start, - children: [ - ...contentChildren.map((w) => Padding(padding: const EdgeInsets.only(bottom: 8.0), child: w)), - Text( - '${activity.user.name} â€ĸ ${activity.createdAt.timeAgo()}', - style: context.textTheme.labelMedium?.copyWith( - color: context.colorScheme.onSurface.withValues(alpha: 0.6), - ), - ), - ], - ), - if (isOwn) const SizedBox(width: 8), - ], - ), - ), - ), - ), - ); - } -} diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dart index 661c8d127d..58ca892f5f 100644 --- a/mobile/lib/presentation/pages/search/drift_search.page.dart +++ b/mobile/lib/presentation/pages/search/drift_search.page.dart @@ -15,6 +15,7 @@ import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/models/search/search_filter.model.dart'; import 'package:immich_mobile/presentation/pages/search/paginated_search.provider.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/general_bottom_sheet.widget.dart'; +import 'package:immich_mobile/presentation/widgets/search/quick_date_picker.dart'; import 'package:immich_mobile/presentation/widgets/timeline/timeline.widget.dart'; import 'package:immich_mobile/providers/infrastructure/timeline.provider.dart'; import 'package:immich_mobile/providers/search/search_input_focus.provider.dart'; @@ -54,6 +55,7 @@ class DriftSearchPage extends HookConsumerWidget { ); final previousFilter = useState(null); + final dateInputFilter = useState(null); final peopleCurrentFilterWidget = useState(null); final dateRangeCurrentFilterWidget = useState(null); @@ -73,27 +75,29 @@ class DriftSearchPage extends HookConsumerWidget { ); } - search() async { - if (filter.value.isEmpty) { + searchFilter(SearchFilter filter) async { + if (filter.isEmpty) { return; } - if (preFilter == null && filter.value == previousFilter.value) { + if (preFilter == null && filter == previousFilter.value) { return; } isSearching.value = true; ref.watch(paginatedSearchProvider.notifier).clear(); - final hasResult = await ref.watch(paginatedSearchProvider.notifier).search(filter.value); + final hasResult = await ref.watch(paginatedSearchProvider.notifier).search(filter); if (!hasResult) { context.showSnackBar(searchInfoSnackBar('search_no_result'.t(context: context))); } - previousFilter.value = filter.value; + previousFilter.value = filter; isSearching.value = false; } + search() => searchFilter(filter.value); + loadMoreSearchResult() async { isSearching.value = true; final hasResult = await ref.watch(paginatedSearchProvider.notifier).search(filter.value); @@ -108,7 +112,7 @@ class DriftSearchPage extends HookConsumerWidget { searchPreFilter() { if (preFilter != null) { Future.delayed(Duration.zero, () { - search(); + searchFilter(preFilter); if (preFilter.location.city != null) { locationCurrentFilterWidget.value = Text(preFilter.location.city!, style: context.textTheme.labelLarge); @@ -122,7 +126,7 @@ class DriftSearchPage extends HookConsumerWidget { searchPreFilter(); return null; - }, []); + }, [preFilter]); showPeoplePicker() { handleOnSelect(Set value) { @@ -243,19 +247,54 @@ class DriftSearchPage extends HookConsumerWidget { ); } + datePicked(DateFilterInputModel? selectedDate) { + dateInputFilter.value = selectedDate; + if (selectedDate == null) { + filter.value = filter.value.copyWith(date: SearchDateFilter()); + + dateRangeCurrentFilterWidget.value = null; + unawaited(search()); + return; + } + + final date = selectedDate.asDateTimeRange(); + + filter.value = filter.value.copyWith( + date: SearchDateFilter( + takenAfter: date.start, + takenBefore: date.end.add(const Duration(hours: 23, minutes: 59, seconds: 59)), + ), + ); + + dateRangeCurrentFilterWidget.value = Text( + selectedDate.asHumanReadable(context), + style: context.textTheme.labelLarge, + ); + + unawaited(search()); + } + showDatePicker() async { final firstDate = DateTime(1900); final lastDate = DateTime.now(); + var dateRange = DateTimeRange( + start: filter.value.date.takenAfter ?? lastDate, + end: filter.value.date.takenBefore ?? lastDate, + ); + + // datePicked() may increase the date, this will make the date picker fail an assertion + // Fixup the end date to be at most now. + if (dateRange.end.isAfter(lastDate)) { + dateRange = DateTimeRange(start: dateRange.start, end: lastDate); + } + final date = await showDateRangePicker( context: context, firstDate: firstDate, lastDate: lastDate, currentDate: DateTime.now(), - initialDateRange: DateTimeRange( - start: filter.value.date.takenAfter ?? lastDate, - end: filter.value.date.takenBefore ?? lastDate, - ), + initialDateRange: dateRange, helpText: 'search_filter_date_title'.t(context: context), cancelText: 'cancel'.t(context: context), confirmText: 'select'.t(context: context), @@ -269,40 +308,32 @@ class DriftSearchPage extends HookConsumerWidget { ); if (date == null) { - filter.value = filter.value.copyWith(date: SearchDateFilter()); - - dateRangeCurrentFilterWidget.value = null; - unawaited(search()); - return; - } - - filter.value = filter.value.copyWith( - date: SearchDateFilter( - takenAfter: date.start, - takenBefore: date.end.add(const Duration(hours: 23, minutes: 59, seconds: 59)), - ), - ); - - // If date range is less than 24 hours, set the end date to the end of the day - if (date.end.difference(date.start).inHours < 24) { - dateRangeCurrentFilterWidget.value = Text( - DateFormat.yMMMd().format(date.start.toLocal()), - style: context.textTheme.labelLarge, - ); + datePicked(null); } else { - dateRangeCurrentFilterWidget.value = Text( - 'search_filter_date_interval'.t( - context: context, - args: { - "start": DateFormat.yMMMd().format(date.start.toLocal()), - "end": DateFormat.yMMMd().format(date.end.toLocal()), + datePicked(CustomDateFilter.fromRange(date)); + } + } + + showQuickDatePicker() { + showFilterBottomSheet( + context: context, + child: FilterBottomSheetScaffold( + title: "pick_date_range".tr(), + expanded: true, + onClear: () => datePicked(null), + child: QuickDatePicker( + currentInput: dateInputFilter.value, + onRequestPicker: () { + context.pop(); + showDatePicker(); + }, + onSelect: (date) { + context.pop(); + datePicked(date); }, ), - style: context.textTheme.labelLarge, - ); - } - - unawaited(search()); + ), + ); } // MEDIA PICKER @@ -587,7 +618,7 @@ class DriftSearchPage extends HookConsumerWidget { ), SearchFilterChip( icon: Icons.date_range_outlined, - onTap: showDatePicker, + onTap: showQuickDatePicker, label: 'search_filter_date'.t(context: context), currentFilter: dateRangeCurrentFilterWidget.value, ), diff --git a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart index f9ba31e8be..4cbc0f0bb8 100644 --- a/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart +++ b/mobile/lib/presentation/widgets/action_buttons/similar_photos_action_button.widget.dart @@ -35,7 +35,8 @@ class SimilarPhotosActionButton extends ConsumerWidget { mediaType: AssetType.image, ), ); - unawaited(context.router.popAndPush(const DriftSearchRoute())); + + unawaited(context.navigateTo(const DriftSearchRoute())); } @override diff --git a/mobile/lib/presentation/widgets/asset_viewer/activities_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/activities_bottom_sheet.widget.dart index 81e64bed89..63669495b9 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/activities_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/activities_bottom_sheet.widget.dart @@ -3,14 +3,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/extensions/asyncvalue_extensions.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/widgets/activities/comment_bubble.dart'; import 'package:immich_mobile/presentation/widgets/album/drift_activity_text_field.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; import 'package:immich_mobile/providers/activity.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset_viewer/current_asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/current_album.provider.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; -import 'package:immich_mobile/widgets/activities/activity_tile.dart'; -import 'package:immich_mobile/widgets/activities/dismissible_activity.dart'; class ActivitiesBottomSheet extends HookConsumerWidget { final DraggableScrollableController controller; @@ -28,7 +26,6 @@ class ActivitiesBottomSheet extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final album = ref.watch(currentRemoteAlbumProvider)!; final asset = ref.watch(currentAssetNotifier) as RemoteAsset?; - final user = ref.watch(currentUserProvider); final activityNotifier = ref.read(albumActivityProvider(album.id, asset?.id).notifier); final activities = ref.watch(albumActivityProvider(album.id, asset?.id)); @@ -47,16 +44,9 @@ class ActivitiesBottomSheet extends HookConsumerWidget { return const SizedBox.shrink(); } final activity = data[data.length - 1 - index]; - final canDelete = activity.user.id == user?.id || album.ownerId == user?.id; return Padding( - padding: const EdgeInsets.symmetric(vertical: 1), - child: DismissibleActivity( - activity.id, - ActivityTile(activity, isBottomSheet: true), - onDismiss: canDelete - ? (activityId) async => await activityNotifier.removeActivity(activity.id) - : null, - ), + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), + child: CommentBubble(activity: activity, isAssetActivity: true), ); }, childCount: data.length + 1), ); diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart index f8a2c37ccd..50c4347301 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_viewer.page.dart @@ -627,10 +627,10 @@ class _AssetViewerState extends ConsumerState { // Rebuild the widget when the asset viewer state changes // Using multiple selectors to avoid unnecessary rebuilds for other state changes ref.watch(assetViewerProvider.select((s) => s.showingBottomSheet)); - ref.watch(assetViewerProvider.select((s) => s.showingControls)); ref.watch(assetViewerProvider.select((s) => s.backgroundOpacity)); ref.watch(assetViewerProvider.select((s) => s.stackIndex)); ref.watch(isPlayingMotionVideoProvider); + final showingControls = ref.watch(assetViewerProvider.select((s) => s.showingControls)); // Listen for casting changes and send initial asset to the cast provider ref.listen(castProvider.select((value) => value.isCasting), (_, isCasting) async { @@ -663,7 +663,14 @@ class _AssetViewerState extends ConsumerState { appBar: const ViewerTopAppBar(), extendBody: true, extendBodyBehindAppBar: true, - floatingActionButton: const DownloadStatusFloatingButton(), + floatingActionButton: IgnorePointer( + ignoring: !showingControls, + child: AnimatedOpacity( + opacity: showingControls ? 1.0 : 0.0, + duration: Durations.short2, + child: const DownloadStatusFloatingButton(), + ), + ), body: Stack( children: [ PhotoViewGallery.builder( diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart index 00e16fa870..d29e09a247 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart @@ -127,13 +127,18 @@ class _AssetDetailBottomSheet extends ConsumerWidget { if (exifInfo == null) { return null; } - - final fNumber = exifInfo.fNumber.isNotEmpty ? 'ƒ/${exifInfo.fNumber}' : null; final exposureTime = exifInfo.exposureTime.isNotEmpty ? exifInfo.exposureTime : null; - final focalLength = exifInfo.focalLength.isNotEmpty ? '${exifInfo.focalLength} mm' : null; final iso = exifInfo.iso != null ? 'ISO ${exifInfo.iso}' : null; + return [exposureTime, iso].where((spec) => spec != null && spec.isNotEmpty).join(_kSeparator); + } - return [fNumber, exposureTime, focalLength, iso].where((spec) => spec != null && spec.isNotEmpty).join(_kSeparator); + String? _getLensInfoSubtitle(ExifInfo? exifInfo) { + if (exifInfo == null) { + return null; + } + final fNumber = exifInfo.fNumber.isNotEmpty ? 'ƒ/${exifInfo.fNumber}' : null; + final focalLength = exifInfo.focalLength.isNotEmpty ? '${exifInfo.focalLength} mm' : null; + return [fNumber, focalLength].where((spec) => spec != null && spec.isNotEmpty).join(_kSeparator); } Future _editDateTime(BuildContext context, WidgetRef ref) async { @@ -141,14 +146,28 @@ class _AssetDetailBottomSheet extends ConsumerWidget { } Widget _buildAppearsInList(WidgetRef ref, BuildContext context) { - final isRemote = ref.watch(currentAssetNotifier)?.hasRemote ?? false; - if (!isRemote) { + final asset = ref.watch(currentAssetNotifier); + if (asset == null) { + return const SizedBox.shrink(); + } + + if (!asset.hasRemote) { + return const SizedBox.shrink(); + } + + String? remoteAssetId; + if (asset is RemoteAsset) { + remoteAssetId = asset.id; + } else if (asset is LocalAsset) { + remoteAssetId = asset.remoteAssetId; + } + + if (remoteAssetId == null) { return const SizedBox.shrink(); } - final remoteAsset = ref.watch(currentAssetNotifier) as RemoteAsset; final userId = ref.watch(currentUserProvider)?.id; - final assetAlbums = ref.watch(albumsContainingAssetProvider(remoteAsset.id)); + final assetAlbums = ref.watch(albumsContainingAssetProvider(remoteAssetId)); return assetAlbums.when( data: (albums) { @@ -203,6 +222,7 @@ class _AssetDetailBottomSheet extends ConsumerWidget { final exifInfo = ref.watch(currentAssetExifProvider).valueOrNull; final cameraTitle = _getCameraInfoTitle(exifInfo); + final lensTitle = exifInfo?.lens != null && exifInfo!.lens!.isNotEmpty ? exifInfo.lens : null; final isOwner = ref.watch(currentUserProvider)?.id == (asset is RemoteAsset ? asset.ownerId : null); // Build file info tile based on asset type @@ -273,12 +293,23 @@ class _AssetDetailBottomSheet extends ConsumerWidget { _SheetTile( title: cameraTitle, titleStyle: context.textTheme.labelLarge, - leading: Icon(Icons.camera_outlined, size: 24, color: context.textTheme.labelLarge?.color), + leading: Icon(Icons.camera_alt_outlined, size: 24, color: context.textTheme.labelLarge?.color), subtitle: _getCameraInfoSubtitle(exifInfo), subtitleStyle: context.textTheme.bodyMedium?.copyWith( color: context.textTheme.bodyMedium?.color?.withAlpha(155), ), ), + // Lens info + if (lensTitle != null) + _SheetTile( + title: lensTitle, + titleStyle: context.textTheme.labelLarge, + leading: Icon(Icons.camera_outlined, size: 24, color: context.textTheme.labelLarge?.color), + subtitle: _getLensInfoSubtitle(exifInfo), + subtitleStyle: context.textTheme.bodyMedium?.copyWith( + color: context.textTheme.bodyMedium?.color?.withAlpha(155), + ), + ), // Appears in (Albums) _buildAppearsInList(ref, context), // padding at the bottom to avoid cut-off diff --git a/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart index 7205dad941..2f2847543f 100644 --- a/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart @@ -86,13 +86,9 @@ class _BaseDraggableScrollableSheetState extends ConsumerState SliverToBoxAdapter( child: Column( children: [ - SizedBox( - height: 115, - child: ListView( - shrinkWrap: true, - scrollDirection: Axis.horizontal, - children: widget.actions, - ), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: widget.actions), ), const Divider(indent: 16, endIndent: 16), const SizedBox(height: 16), diff --git a/mobile/lib/presentation/widgets/search/quick_date_picker.dart b/mobile/lib/presentation/widgets/search/quick_date_picker.dart new file mode 100644 index 0000000000..09b1cee700 --- /dev/null +++ b/mobile/lib/presentation/widgets/search/quick_date_picker.dart @@ -0,0 +1,208 @@ +import 'package:easy_localization/easy_localization.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_hooks/flutter_hooks.dart'; +import 'package:immich_mobile/extensions/translate_extensions.dart'; + +sealed class DateFilterInputModel { + DateTimeRange asDateTimeRange(); + + String asHumanReadable(BuildContext context) { + // General implementation for arbitrary date and time ranges + // If date range is less than 24 hours, set the end date to the end of the day + final date = asDateTimeRange(); + if (date.end.difference(date.start).inHours < 24) { + return DateFormat.yMMMd().format(date.start.toLocal()); + } else { + return 'search_filter_date_interval'.t( + context: context, + args: { + "start": DateFormat.yMMMd().format(date.start.toLocal()), + "end": DateFormat.yMMMd().format(date.end.toLocal()), + }, + ); + } + } +} + +class RecentMonthRangeFilter extends DateFilterInputModel { + final int monthDelta; + RecentMonthRangeFilter(this.monthDelta); + + @override + DateTimeRange asDateTimeRange() { + final now = DateTime.now(); + // Note that DateTime's constructor properly handles month overflow. + final from = DateTime(now.year, now.month - monthDelta, 1); + return DateTimeRange(start: from, end: now); + } + + @override + String asHumanReadable(BuildContext context) { + return 'last_months'.t(context: context, args: {"count": monthDelta.toString()}); + } +} + +class YearFilter extends DateFilterInputModel { + final int year; + YearFilter(this.year); + + @override + DateTimeRange asDateTimeRange() { + final now = DateTime.now(); + final from = DateTime(year, 1, 1); + + if (now.year == year) { + // To not go beyond today if the user picks the current year + return DateTimeRange(start: from, end: now); + } + + final to = DateTime(year, 12, 31, 23, 59, 59); + return DateTimeRange(start: from, end: to); + } + + @override + String asHumanReadable(BuildContext context) { + return 'in_year'.tr(namedArgs: {"year": year.toString()}); + } +} + +class CustomDateFilter extends DateFilterInputModel { + final DateTime start; + final DateTime end; + + CustomDateFilter(this.start, this.end); + + factory CustomDateFilter.fromRange(DateTimeRange range) { + return CustomDateFilter(range.start, range.end); + } + + @override + DateTimeRange asDateTimeRange() { + return DateTimeRange(start: start, end: end); + } +} + +enum _QuickPickerType { last1Month, last3Months, last9Months, year, custom } + +class QuickDatePicker extends HookWidget { + QuickDatePicker({super.key, required this.currentInput, required this.onSelect, required this.onRequestPicker}) + : _selection = _selectionFromModel(currentInput), + _initialYear = _initialYearFromModel(currentInput); + + final Function() onRequestPicker; + final Function(DateFilterInputModel range) onSelect; + + final DateFilterInputModel? currentInput; + final _QuickPickerType? _selection; + final int _initialYear; + + // Generate a list of recent years from 2000 to the current year (including the current one) + final List _recentYears = List.generate(1 + DateTime.now().year - 2000, (index) { + return index + 2000; + }); + + static int _initialYearFromModel(DateFilterInputModel? model) { + return model?.asDateTimeRange().start.year ?? DateTime.now().year; + } + + static _QuickPickerType? _selectionFromModel(DateFilterInputModel? model) { + if (model is RecentMonthRangeFilter) { + return switch (model.monthDelta) { + 1 => _QuickPickerType.last1Month, + 3 => _QuickPickerType.last3Months, + 9 => _QuickPickerType.last9Months, + _ => _QuickPickerType.custom, + }; + } else if (model is YearFilter) { + return _QuickPickerType.year; + } else if (model is CustomDateFilter) { + return _QuickPickerType.custom; + } + return null; + } + + Text _monthLabel(BuildContext context, int monthsFromNow) => + const Text('last_months').t(context: context, args: {"count": monthsFromNow.toString()}); + + Widget _yearPicker(BuildContext context) { + final size = MediaQuery.of(context).size; + return Row( + children: [ + const Text("in_year_selector").tr(), + const SizedBox(width: 15), + Expanded( + child: DropdownMenu( + initialSelection: _initialYear, + menuStyle: MenuStyle(maximumSize: WidgetStateProperty.all(Size(size.width, size.height * 0.5))), + dropdownMenuEntries: _recentYears.map((e) => DropdownMenuEntry(value: e, label: e.toString())).toList(), + onSelected: (year) { + if (year == null) return; + onSelect(YearFilter(year)); + }, + ), + ), + ], + ); + } + + // We want the exact date picker to always be selectable. + // Even if it's already toggled it should always open the full date picker, RadioListTiles don't do that by default + // so we wrap it in a InkWell + Widget _exactPicker(BuildContext context) { + final hasPreviousInput = currentInput != null && currentInput is CustomDateFilter; + + return InkWell( + onTap: onRequestPicker, + child: IgnorePointer( + ignoring: true, + child: RadioListTile( + title: const Text('pick_custom_range').tr(), + subtitle: hasPreviousInput ? Text(currentInput!.asHumanReadable(context)) : null, + secondary: hasPreviousInput ? const Icon(Icons.edit) : null, + value: _QuickPickerType.custom, + toggleable: true, + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + child: Scrollbar( + // Depending on the screen size the last option might get cut off + // Add a clear visual cue that there are more options when scrolling + // When the screen size is large enough the scrollbar is hidden automatically + trackVisibility: true, + thumbVisibility: true, + child: SingleChildScrollView( + child: RadioGroup( + onChanged: (value) { + if (value == null) return; + final _ = switch (value) { + _QuickPickerType.custom => onRequestPicker(), + _QuickPickerType.last1Month => onSelect(RecentMonthRangeFilter(1)), + _QuickPickerType.last3Months => onSelect(RecentMonthRangeFilter(3)), + _QuickPickerType.last9Months => onSelect(RecentMonthRangeFilter(9)), + // When a year is selected the combobox triggers onSelect() on its own. + // Here we handle the radio button being selected which can only ever be the initial year + _QuickPickerType.year => onSelect(YearFilter(_initialYear)), + }; + }, + groupValue: _selection, + child: Column( + children: [ + RadioListTile(title: _monthLabel(context, 1), value: _QuickPickerType.last1Month, toggleable: true), + RadioListTile(title: _monthLabel(context, 3), value: _QuickPickerType.last3Months, toggleable: true), + RadioListTile(title: _monthLabel(context, 9), value: _QuickPickerType.last9Months, toggleable: true), + RadioListTile(title: _yearPicker(context), value: _QuickPickerType.year, toggleable: true), + _exactPicker(context), + ], + ), + ), + ), + ), + ); + } +} diff --git a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart index 5f1e7f27b0..70dd15bf7f 100644 --- a/mobile/lib/presentation/widgets/timeline/timeline.widget.dart +++ b/mobile/lib/presentation/widgets/timeline/timeline.widget.dart @@ -228,6 +228,8 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> { curve: Curves.easeInOut, ) .whenComplete(() => ref.read(timelineStateProvider.notifier).setScrubbing(false)); + } else { + ref.read(timelineStateProvider.notifier).setScrubbing(false); } }); } diff --git a/mobile/lib/providers/activity.provider.dart b/mobile/lib/providers/activity.provider.dart index a867a5a281..5e0e71d85d 100644 --- a/mobile/lib/providers/activity.provider.dart +++ b/mobile/lib/providers/activity.provider.dart @@ -1,3 +1,4 @@ +import 'package:collection/collection.dart'; import 'package:immich_mobile/models/activities/activity.model.dart'; import 'package:immich_mobile/providers/activity_service.provider.dart'; import 'package:immich_mobile/providers/activity_statistics.provider.dart'; @@ -16,13 +17,20 @@ class AlbumActivity extends _$AlbumActivity { Future removeActivity(String id) async { if (await ref.watch(activityServiceProvider).removeActivity(id)) { - final activities = state.valueOrNull ?? []; - final removedActivity = activities.firstWhere((a) => a.id == id); - activities.remove(removedActivity); - state = AsyncData(activities); - // Decrement activity count only for comments + final removedActivity = _removeFromState(id); + if (removedActivity == null) { + return; + } + + if (assetId != null) { + ref.read(albumActivityProvider(albumId).notifier)._removeFromState(id); + } + if (removedActivity.type == ActivityType.comment) { ref.watch(activityStatisticsProvider(albumId, assetId).notifier).removeActivity(); + if (assetId != null) { + ref.watch(activityStatisticsProvider(albumId).notifier).removeActivity(); + } } } } @@ -30,8 +38,10 @@ class AlbumActivity extends _$AlbumActivity { Future addLike() async { final activity = await ref.watch(activityServiceProvider).addActivity(albumId, ActivityType.like, assetId: assetId); if (activity.hasValue) { - final activities = state.asData?.value ?? []; - state = AsyncData([...activities, activity.requireValue]); + _addToState(activity.requireValue); + if (assetId != null) { + ref.read(albumActivityProvider(albumId).notifier)._addToState(activity.requireValue); + } } } @@ -41,8 +51,10 @@ class AlbumActivity extends _$AlbumActivity { .addActivity(albumId, ActivityType.comment, assetId: assetId, comment: comment); if (activity.hasValue) { - final activities = state.valueOrNull ?? []; - state = AsyncData([...activities, activity.requireValue]); + _addToState(activity.requireValue); + if (assetId != null) { + ref.read(albumActivityProvider(albumId).notifier)._addToState(activity.requireValue); + } ref.watch(activityStatisticsProvider(albumId, assetId).notifier).addActivity(); // The previous addActivity call would increase the count of an asset if assetId != null // To also increase the activity count of the album, calling it once again with assetId set to null @@ -51,6 +63,29 @@ class AlbumActivity extends _$AlbumActivity { } } } + + void _addToState(Activity activity) { + final activities = state.valueOrNull ?? []; + if (activities.any((a) => a.id == activity.id)) { + return; + } + state = AsyncData([...activities, activity]); + } + + Activity? _removeFromState(String id) { + final activities = state.valueOrNull; + if (activities == null) { + return null; + } + final activity = activities.firstWhereOrNull((a) => a.id == id); + if (activity == null) { + return null; + } + + final updated = [...activities]..remove(activity); + state = AsyncData(updated); + return activity; + } } /// Mock class for testing diff --git a/mobile/lib/providers/activity.provider.g.dart b/mobile/lib/providers/activity.provider.g.dart index dc927795f8..6ca99e4f72 100644 --- a/mobile/lib/providers/activity.provider.g.dart +++ b/mobile/lib/providers/activity.provider.g.dart @@ -6,7 +6,7 @@ part of 'activity.provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$albumActivityHash() => r'3b0d7acee4d41c84b3f220784c3b904c83f836e6'; +String _$albumActivityHash() => r'154e8ae98da3efc142369eae46d4005468fd67da'; /// Copied from Dart SDK class _SystemHash { diff --git a/mobile/lib/providers/infrastructure/asset.provider.dart b/mobile/lib/providers/infrastructure/asset.provider.dart index 4b51ce33bd..70cb200bf1 100644 --- a/mobile/lib/providers/infrastructure/asset.provider.dart +++ b/mobile/lib/providers/infrastructure/asset.provider.dart @@ -2,6 +2,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/services/asset.service.dart'; import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/remote_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart'; @@ -13,6 +14,10 @@ final remoteAssetRepositoryProvider = Provider( (ref) => RemoteAssetRepository(ref.watch(driftProvider)), ); +final trashedLocalAssetRepository = Provider( + (ref) => DriftTrashedLocalAssetRepository(ref.watch(driftProvider)), +); + final assetServiceProvider = Provider( (ref) => AssetService( remoteAssetRepository: ref.watch(remoteAssetRepositoryProvider), diff --git a/mobile/lib/providers/infrastructure/sync.provider.dart b/mobile/lib/providers/infrastructure/sync.provider.dart index f03754505c..6ba9c4bb78 100644 --- a/mobile/lib/providers/infrastructure/sync.provider.dart +++ b/mobile/lib/providers/infrastructure/sync.provider.dart @@ -10,11 +10,17 @@ import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/cancel.provider.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; import 'package:immich_mobile/providers/infrastructure/platform.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/storage.provider.dart'; +import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; final syncStreamServiceProvider = Provider( (ref) => SyncStreamService( syncApiRepository: ref.watch(syncApiRepositoryProvider), syncStreamRepository: ref.watch(syncStreamRepositoryProvider), + localAssetRepository: ref.watch(localAssetRepository), + trashedLocalAssetRepository: ref.watch(trashedLocalAssetRepository), + localFilesManager: ref.watch(localFilesManagerRepositoryProvider), + storageRepository: ref.watch(storageRepositoryProvider), cancelChecker: ref.watch(cancellationProvider), ), ); @@ -26,6 +32,9 @@ final syncStreamRepositoryProvider = Provider((ref) => SyncStreamRepository(ref. final localSyncServiceProvider = Provider( (ref) => LocalSyncService( localAlbumRepository: ref.watch(localAlbumRepository), + trashedLocalAssetRepository: ref.watch(trashedLocalAssetRepository), + localFilesManager: ref.watch(localFilesManagerRepositoryProvider), + storageRepository: ref.watch(storageRepositoryProvider), nativeSyncApi: ref.watch(nativeSyncApiProvider), ), ); @@ -35,5 +44,6 @@ final hashServiceProvider = Provider( localAlbumRepository: ref.watch(localAlbumRepository), localAssetRepository: ref.watch(localAssetRepository), nativeSyncApi: ref.watch(nativeSyncApiProvider), + trashedLocalAssetRepository: ref.watch(trashedLocalAssetRepository), ), ); diff --git a/mobile/lib/providers/infrastructure/trash_sync.provider.dart b/mobile/lib/providers/infrastructure/trash_sync.provider.dart new file mode 100644 index 0000000000..a783080f33 --- /dev/null +++ b/mobile/lib/providers/infrastructure/trash_sync.provider.dart @@ -0,0 +1,12 @@ +import 'package:async/async.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; + +typedef TrashedAssetsCount = ({int total, int hashed}); + +final trashedAssetsCountProvider = StreamProvider((ref) { + final repo = ref.watch(trashedLocalAssetRepository); + final total$ = repo.watchCount(); + final hashed$ = repo.watchHashedCount(); + return StreamZip([total$, hashed$]).map((values) => (total: values[0], hashed: values[1])); +}); diff --git a/mobile/lib/providers/server_info.provider.dart b/mobile/lib/providers/server_info.provider.dart index 7a424c332d..9619ba86a1 100644 --- a/mobile/lib/providers/server_info.provider.dart +++ b/mobile/lib/providers/server_info.provider.dart @@ -67,7 +67,7 @@ class ServerInfoNotifier extends StateNotifier { return; } - if (clientVersion < serverVersion) { + if (clientVersion < serverVersion && clientVersion.differenceType(serverVersion) != SemVerType.patch) { state = state.copyWith(versionStatus: VersionStatus.clientOutOfDate); return; } diff --git a/mobile/lib/providers/trash.provider.dart b/mobile/lib/providers/trash.provider.dart index adf3b1027b..41b9160b9b 100644 --- a/mobile/lib/providers/trash.provider.dart +++ b/mobile/lib/providers/trash.provider.dart @@ -1,6 +1,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/services/trash.service.dart'; import 'package:immich_mobile/entities/asset.entity.dart'; +import 'package:immich_mobile/services/trash.service.dart'; import 'package:logging/logging.dart'; class TrashNotifier extends StateNotifier { diff --git a/mobile/lib/repositories/asset_media.repository.dart b/mobile/lib/repositories/asset_media.repository.dart index e377ff22d6..2e4bdfd32c 100644 --- a/mobile/lib/repositories/asset_media.repository.dart +++ b/mobile/lib/repositories/asset_media.repository.dart @@ -89,9 +89,16 @@ class AssetMediaRepository { return null; } - // titleAsync gets the correct original filename for some assets on iOS - // otherwise using the `entity.title` would return a random GUID - return await entity.titleAsync; + try { + // titleAsync gets the correct original filename for some assets on iOS + // otherwise using the `entity.title` would return a random GUID + final originalFilename = await entity.titleAsync; + // treat empty filename as missing + return originalFilename.isNotEmpty ? originalFilename : null; + } catch (e) { + _log.warning("Failed to get original filename for asset: $id. Error: $e"); + return null; + } } // TODO: make this more efficient diff --git a/mobile/lib/repositories/folder_api.repository.dart b/mobile/lib/repositories/folder_api.repository.dart index dfda19e45e..d20ca8e0a9 100644 --- a/mobile/lib/repositories/folder_api.repository.dart +++ b/mobile/lib/repositories/folder_api.repository.dart @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; final folderApiRepositoryProvider = Provider((ref) => FolderApiRepository(ref.watch(apiServiceProvider).viewApi)); class FolderApiRepository extends ApiRepository { - final ViewApi _api; + final ViewsApi _api; final Logger _log = Logger("FolderApiRepository"); FolderApiRepository(this._api); diff --git a/mobile/lib/repositories/local_files_manager.repository.dart b/mobile/lib/repositories/local_files_manager.repository.dart index 519d79b49b..765c9a6f0e 100644 --- a/mobile/lib/repositories/local_files_manager.repository.dart +++ b/mobile/lib/repositories/local_files_manager.repository.dart @@ -1,13 +1,16 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; import 'package:immich_mobile/services/local_files_manager.service.dart'; +import 'package:logging/logging.dart'; final localFilesManagerRepositoryProvider = Provider( (ref) => LocalFilesManagerRepository(ref.watch(localFileManagerServiceProvider)), ); class LocalFilesManagerRepository { - const LocalFilesManagerRepository(this._service); + LocalFilesManagerRepository(this._service); + final Logger _logger = Logger('SyncStreamService'); final LocalFilesManagerService _service; Future moveToTrash(List mediaUrls) async { @@ -21,4 +24,26 @@ class LocalFilesManagerRepository { Future requestManageMediaPermission() async { return await _service.requestManageMediaPermission(); } + + Future hasManageMediaPermission() async { + return await _service.hasManageMediaPermission(); + } + + Future manageMediaPermission() async { + return await _service.manageMediaPermission(); + } + + Future> restoreAssetsFromTrash(Iterable assets) async { + final restoredIds = []; + for (final asset in assets) { + _logger.info("Restoring from trash, localId: ${asset.id}, remoteId: ${asset.checksum}"); + try { + await _service.restoreFromTrashById(asset.id, asset.type.index); + restoredIds.add(asset.id); + } catch (e) { + _logger.warning("Restoring failure: $e"); + } + } + return restoredIds; + } } diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dart index 5c0299c414..abe7ac3fa2 100644 --- a/mobile/lib/routing/router.dart +++ b/mobile/lib/routing/router.dart @@ -313,6 +313,7 @@ class AppRouter extends RootStackRouter { settings: page, pageBuilder: (_, __, ___) => child, opaque: false, + transitionsBuilder: TransitionsBuilders.fadeIn, ), ), ), diff --git a/mobile/lib/services/api.service.dart b/mobile/lib/services/api.service.dart index 698ac3a159..1a714b6f40 100644 --- a/mobile/lib/services/api.service.dart +++ b/mobile/lib/services/api.service.dart @@ -17,7 +17,7 @@ class ApiService implements Authentication { late UsersApi usersApi; late AuthenticationApi authenticationApi; - late OAuthApi oAuthApi; + late AuthenticationApi oAuthApi; late AlbumsApi albumsApi; late AssetsApi assetsApi; late SearchApi searchApi; @@ -32,7 +32,7 @@ class ApiService implements Authentication { late DownloadApi downloadApi; late TrashApi trashApi; late StacksApi stacksApi; - late ViewApi viewApi; + late ViewsApi viewApi; late MemoriesApi memoriesApi; late SessionsApi sessionsApi; @@ -56,7 +56,7 @@ class ApiService implements Authentication { } usersApi = UsersApi(_apiClient); authenticationApi = AuthenticationApi(_apiClient); - oAuthApi = OAuthApi(_apiClient); + oAuthApi = AuthenticationApi(_apiClient); albumsApi = AlbumsApi(_apiClient); assetsApi = AssetsApi(_apiClient); serverInfoApi = ServerApi(_apiClient); @@ -71,7 +71,7 @@ class ApiService implements Authentication { downloadApi = DownloadApi(_apiClient); trashApi = TrashApi(_apiClient); stacksApi = StacksApi(_apiClient); - viewApi = ViewApi(_apiClient); + viewApi = ViewsApi(_apiClient); memoriesApi = MemoriesApi(_apiClient); sessionsApi = SessionsApi(_apiClient); } diff --git a/mobile/lib/services/deep_link.service.dart b/mobile/lib/services/deep_link.service.dart index d67362aac2..6ede7f6830 100644 --- a/mobile/lib/services/deep_link.service.dart +++ b/mobile/lib/services/deep_link.service.dart @@ -77,6 +77,7 @@ class DeepLinkService { "memory" => await _buildMemoryDeepLink(queryParams['id'] ?? ''), "asset" => await _buildAssetDeepLink(queryParams['id'] ?? '', ref), "album" => await _buildAlbumDeepLink(queryParams['id'] ?? ''), + "activity" => await _buildActivityDeepLink(queryParams['albumId'] ?? ''), _ => null, }; @@ -185,4 +186,18 @@ class DeepLinkService { return AlbumViewerRoute(albumId: album.id); } } + + Future _buildActivityDeepLink(String albumId) async { + if (Store.isBetaTimelineEnabled == false) { + return null; + } + + final album = await _betaRemoteAlbumService.get(albumId); + + if (album == null || album.isActivityEnabled == false) { + return null; + } + + return DriftActivitiesRoute(album: album); + } } diff --git a/mobile/lib/services/local_files_manager.service.dart b/mobile/lib/services/local_files_manager.service.dart index 7cb3067342..0cc00f3e4b 100644 --- a/mobile/lib/services/local_files_manager.service.dart +++ b/mobile/lib/services/local_files_manager.service.dart @@ -6,6 +6,7 @@ final localFileManagerServiceProvider = Provider((ref) class LocalFilesManagerService { const LocalFilesManagerService(); + static final Logger _logger = Logger('LocalFilesManager'); static const MethodChannel _channel = MethodChannel('file_trash'); @@ -27,6 +28,15 @@ class LocalFilesManagerService { } } + Future restoreFromTrashById(String mediaId, int type) async { + try { + return await _channel.invokeMethod('restoreFromTrash', {'mediaId': mediaId, 'type': type}); + } catch (e, s) { + _logger.warning('Error restore file from trash by Id', e, s); + return false; + } + } + Future requestManageMediaPermission() async { try { return await _channel.invokeMethod('requestManageMediaPermission'); @@ -35,4 +45,22 @@ class LocalFilesManagerService { return false; } } + + Future hasManageMediaPermission() async { + try { + return await _channel.invokeMethod('hasManageMediaPermission'); + } catch (e, s) { + _logger.warning('Error requesting manage media permission state', e, s); + return false; + } + } + + Future manageMediaPermission() async { + try { + return await _channel.invokeMethod('manageMediaPermission'); + } catch (e, s) { + _logger.warning('Error requesting manage media permission settings', e, s); + return false; + } + } } diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dart index de606c83d3..42729becc9 100644 --- a/mobile/lib/utils/action_button.utils.dart +++ b/mobile/lib/utils/action_button.utils.dart @@ -127,7 +127,7 @@ enum ActionButtonType { context.currentAlbum!.isShared, ActionButtonType.similarPhotos => !context.isInLockedView && // - context.asset.hasRemote, + context.asset is RemoteAsset, }; } diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index 0a3fa7e91d..0c1f03086f 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -51,6 +51,11 @@ dynamic upgradeDto(dynamic value, String targetType) { addDefault(value, 'ocr', false); } break; + case 'MemoriesResponse': + if (value is Map) { + addDefault(value, 'duration', 5); + } + break; } } diff --git a/mobile/lib/utils/semver.dart b/mobile/lib/utils/semver.dart index 0eb6726b65..aebfd2fe4c 100644 --- a/mobile/lib/utils/semver.dart +++ b/mobile/lib/utils/semver.dart @@ -1,3 +1,5 @@ +enum SemVerType { major, minor, patch } + class SemVer { final int major; final int minor; @@ -15,8 +17,20 @@ class SemVer { } factory SemVer.fromString(String version) { + if (version.toLowerCase().startsWith("v")) { + version = version.substring(1); + } + final parts = version.split("-")[0].split('.'); - return SemVer(major: int.parse(parts[0]), minor: int.parse(parts[1]), patch: int.parse(parts[2])); + if (parts.length != 3) { + throw FormatException('Invalid semantic version string: $version'); + } + + try { + return SemVer(major: int.parse(parts[0]), minor: int.parse(parts[1]), patch: int.parse(parts[2])); + } catch (e) { + throw FormatException('Invalid semantic version string: $version'); + } } bool operator >(SemVer other) { @@ -54,6 +68,20 @@ class SemVer { return other is SemVer && other.major == major && other.minor == minor && other.patch == patch; } + SemVerType? differenceType(SemVer other) { + if (major != other.major) { + return SemVerType.major; + } + if (minor != other.minor) { + return SemVerType.minor; + } + if (patch != other.patch) { + return SemVerType.patch; + } + + return null; + } + @override int get hashCode => major.hashCode ^ minor.hashCode ^ patch.hashCode; } diff --git a/mobile/lib/widgets/activities/comment_bubble.dart b/mobile/lib/widgets/activities/comment_bubble.dart new file mode 100644 index 0000000000..11d5c21cec --- /dev/null +++ b/mobile/lib/widgets/activities/comment_bubble.dart @@ -0,0 +1,143 @@ +import 'package:auto_route/auto_route.dart'; +import 'package:flutter/material.dart'; +import 'package:hooks_riverpod/hooks_riverpod.dart'; +import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/extensions/datetime_extensions.dart'; +import 'package:immich_mobile/models/activities/activity.model.dart'; +import 'package:immich_mobile/providers/activity.provider.dart'; +import 'package:immich_mobile/providers/activity_service.provider.dart'; +import 'package:immich_mobile/providers/image/immich_remote_thumbnail_provider.dart'; +import 'package:immich_mobile/providers/infrastructure/current_album.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; +import 'package:immich_mobile/widgets/activities/dismissible_activity.dart'; +import 'package:immich_mobile/widgets/common/user_circle_avatar.dart'; + +class CommentBubble extends ConsumerWidget { + final Activity activity; + final bool isAssetActivity; + + const CommentBubble({super.key, required this.activity, this.isAssetActivity = false}); + + @override + Widget build(BuildContext context, WidgetRef ref) { + final user = ref.watch(currentUserProvider); + final album = ref.watch(currentRemoteAlbumProvider)!; + final isOwn = activity.user.id == user?.id; + final canDelete = isOwn || album.ownerId == user?.id; + final showThumbnail = !isAssetActivity && activity.assetId != null && activity.assetId!.isNotEmpty; + final isLike = activity.type == ActivityType.like; + final bgColor = isOwn ? context.colorScheme.primaryContainer : context.colorScheme.surfaceContainer; + + final activityNotifier = ref.read( + albumActivityProvider(album.id, isAssetActivity ? activity.assetId : null).notifier, + ); + + Future openAssetViewer() async { + final activityService = ref.read(activityServiceProvider); + final route = await activityService.buildAssetViewerRoute(activity.assetId!, ref); + if (route != null) await context.pushRoute(route); + } + + // avatar (hidden for own messages) + Widget avatar = const SizedBox.shrink(); + if (!isOwn) { + avatar = UserCircleAvatar(user: activity.user, size: 28, radius: 14); + } + + // Thumbnail with tappable behavior and optional heart overlay + Widget? thumbnail; + if (showThumbnail) { + thumbnail = ConstrainedBox( + constraints: const BoxConstraints(maxWidth: 150, maxHeight: 150), + child: Stack( + children: [ + GestureDetector( + onTap: openAssetViewer, + child: ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(10)), + child: Image( + image: ImmichRemoteThumbnailProvider(assetId: activity.assetId!), + fit: BoxFit.cover, + ), + ), + ), + if (isLike) + Positioned( + right: 6, + bottom: 6, + child: Container( + padding: const EdgeInsets.all(4), + decoration: BoxDecoration(color: Colors.white.withValues(alpha: 0.7), shape: BoxShape.circle), + child: Icon(Icons.favorite, color: Colors.red[600], size: 18), + ), + ), + ], + ), + ); + } + + // Likes widget + Widget? likes; + if (isLike && !showThumbnail) { + likes = Container( + padding: const EdgeInsets.all(8), + decoration: BoxDecoration(color: Colors.white.withValues(alpha: 0.7), shape: BoxShape.circle), + child: Icon(Icons.favorite, color: Colors.red[600], size: 18), + ); + } + + // Comment bubble, comment-only + Widget? commentBubble; + if (activity.comment != null && activity.comment!.isNotEmpty) { + commentBubble = ConstrainedBox( + constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.5), + child: Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration(color: bgColor, borderRadius: const BorderRadius.all(Radius.circular(12))), + child: Text( + activity.comment ?? '', + style: context.textTheme.bodyLarge?.copyWith(color: context.colorScheme.onSurface), + ), + ), + ); + } + + // Combined content widgets + final List contentChildren = [thumbnail, likes, commentBubble].whereType().toList(); + + return DismissibleActivity( + onDismiss: canDelete ? (id) async => await activityNotifier.removeActivity(id) : null, + activity.id, + Align( + alignment: isOwn ? Alignment.centerRight : Alignment.centerLeft, + child: ConstrainedBox( + constraints: BoxConstraints(maxWidth: MediaQuery.of(context).size.width * 0.86), + child: Container( + margin: const EdgeInsets.symmetric(vertical: 6, horizontal: 10), + child: Row( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (!isOwn) ...[avatar, const SizedBox(width: 8)], + // Content column + Column( + crossAxisAlignment: isOwn ? CrossAxisAlignment.end : CrossAxisAlignment.start, + children: [ + ...contentChildren.map((w) => Padding(padding: const EdgeInsets.only(bottom: 8.0), child: w)), + Text( + '${activity.user.name} â€ĸ ${activity.createdAt.timeAgo()}', + style: context.textTheme.labelMedium?.copyWith( + color: context.colorScheme.onSurface.withValues(alpha: 0.6), + ), + ), + ], + ), + if (isOwn) const SizedBox(width: 8), + ], + ), + ), + ), + ), + ); + } +} diff --git a/mobile/lib/widgets/forms/login/login_form.dart b/mobile/lib/widgets/forms/login/login_form.dart index bb987d5bc0..f810973298 100644 --- a/mobile/lib/widgets/forms/login/login_form.dart +++ b/mobile/lib/widgets/forms/login/login_form.dart @@ -21,6 +21,7 @@ import 'package:immich_mobile/providers/gallery_permission.provider.dart'; import 'package:immich_mobile/providers/oauth.provider.dart'; import 'package:immich_mobile/providers/server_info.provider.dart'; import 'package:immich_mobile/providers/websocket.provider.dart'; +import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/utils/provider_utils.dart'; import 'package:immich_mobile/utils/url_helper.dart'; @@ -177,6 +178,55 @@ class LoginForm extends HookConsumerWidget { } } + getManageMediaPermission() async { + final hasPermission = await ref.read(localFilesManagerRepositoryProvider).hasManageMediaPermission(); + if (!hasPermission) { + await showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))), + elevation: 5, + title: Text( + 'manage_media_access_title', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: context.primaryColor), + ).tr(), + content: SingleChildScrollView( + child: ListBody( + children: [ + const Text('manage_media_access_subtitle', style: TextStyle(fontSize: 14)).tr(), + const SizedBox(height: 4), + const Text('manage_media_access_rationale', style: TextStyle(fontSize: 12)).tr(), + ], + ), + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: Text( + 'cancel'.tr(), + style: TextStyle(fontWeight: FontWeight.w600, color: context.primaryColor), + ), + ), + TextButton( + onPressed: () { + ref.read(localFilesManagerRepositoryProvider).requestManageMediaPermission(); + Navigator.of(context).pop(); + }, + child: Text( + 'manage_media_access_settings'.tr(), + style: TextStyle(fontWeight: FontWeight.w600, color: context.primaryColor), + ), + ), + ], + ); + }, + ); + } + } + + bool isSyncRemoteDeletionsMode() => Platform.isAndroid && Store.get(StoreKey.manageLocalMediaAndroid, false); + login() async { TextInput.finishAutofillContext(); @@ -194,6 +244,9 @@ class LoginForm extends HookConsumerWidget { final isBeta = Store.isBetaTimelineEnabled; if (isBeta) { await ref.read(galleryPermissionNotifier.notifier).requestGalleryPermission(); + if (isSyncRemoteDeletionsMode()) { + await getManageMediaPermission(); + } unawaited(handleSyncFlow()); ref.read(websocketProvider.notifier).connect(); unawaited(context.replaceRoute(const TabShellRoute())); @@ -293,6 +346,9 @@ class LoginForm extends HookConsumerWidget { } if (isBeta) { await ref.read(galleryPermissionNotifier.notifier).requestGalleryPermission(); + if (isSyncRemoteDeletionsMode()) { + await getManageMediaPermission(); + } unawaited(handleSyncFlow()); unawaited(context.replaceRoute(const TabShellRoute())); return; diff --git a/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart b/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart index e8226b5b3a..dee42ec5a0 100644 --- a/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart +++ b/mobile/lib/widgets/search/search_filter/filter_bottom_sheet_scaffold.dart @@ -6,7 +6,7 @@ class FilterBottomSheetScaffold extends StatelessWidget { const FilterBottomSheetScaffold({ super.key, required this.child, - required this.onSearch, + this.onSearch, required this.onClear, required this.title, this.expanded, @@ -15,7 +15,7 @@ class FilterBottomSheetScaffold extends StatelessWidget { final bool? expanded; final String title; final Widget child; - final Function() onSearch; + final Function()? onSearch; final Function() onClear; @override @@ -48,15 +48,16 @@ class FilterBottomSheetScaffold extends StatelessWidget { }, child: const Text('clear').tr(), ), - const SizedBox(width: 8), - ElevatedButton( - key: const Key('search_filter_apply'), - onPressed: () { - onSearch(); - context.pop(); - }, - child: const Text('search_filter_apply').tr(), - ), + if (onSearch != null) const SizedBox(width: 8), + if (onSearch != null) + ElevatedButton( + key: const Key('search_filter_apply'), + onPressed: () { + onSearch!(); + context.pop(); + }, + child: const Text('search_filter_apply').tr(), + ), ], ), ), diff --git a/mobile/lib/widgets/settings/advanced_settings.dart b/mobile/lib/widgets/settings/advanced_settings.dart index 9255a7ae52..aee28c9449 100644 --- a/mobile/lib/widgets/settings/advanced_settings.dart +++ b/mobile/lib/widgets/settings/advanced_settings.dart @@ -8,8 +8,8 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/domain/services/log.service.dart'; import 'package:immich_mobile/entities/store.entity.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; -import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/providers/infrastructure/readonly_mode.provider.dart'; +import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; @@ -17,6 +17,7 @@ import 'package:immich_mobile/utils/http_ssl_options.dart'; import 'package:immich_mobile/widgets/settings/beta_timeline_list_tile.dart'; import 'package:immich_mobile/widgets/settings/custom_proxy_headers_settings/custom_proxy_headers_settings.dart'; import 'package:immich_mobile/widgets/settings/local_storage_settings.dart'; +import 'package:immich_mobile/widgets/settings/settings_action_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_slider_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; @@ -25,12 +26,15 @@ import 'package:logging/logging.dart'; class AdvancedSettings extends HookConsumerWidget { const AdvancedSettings({super.key}); + @override Widget build(BuildContext context, WidgetRef ref) { bool isLoggedIn = ref.read(currentUserProvider) != null; final advancedTroubleshooting = useAppSettingsState(AppSettingsEnum.advancedTroubleshooting); final manageLocalMediaAndroid = useAppSettingsState(AppSettingsEnum.manageLocalMediaAndroid); + final isManageMediaSupported = useState(false); + final manageMediaAndroidPermission = useState(false); final levelId = useAppSettingsState(AppSettingsEnum.logLevel); final preferRemote = useAppSettingsState(AppSettingsEnum.preferRemoteImage); final allowSelfSignedSSLCert = useAppSettingsState(AppSettingsEnum.allowSelfSignedSSLCert); @@ -51,6 +55,18 @@ class AdvancedSettings extends HookConsumerWidget { return false; } + useEffect(() { + () async { + isManageMediaSupported.value = await checkAndroidVersion(); + if (isManageMediaSupported.value) { + manageMediaAndroidPermission.value = await ref + .read(localFilesManagerRepositoryProvider) + .hasManageMediaPermission(); + } + }(); + return null; + }, []); + final advancedSettings = [ SettingsSwitchListTile( enabled: true, @@ -58,11 +74,10 @@ class AdvancedSettings extends HookConsumerWidget { title: "advanced_settings_troubleshooting_title".tr(), subtitle: "advanced_settings_troubleshooting_subtitle".tr(), ), - FutureBuilder( - future: checkAndroidVersion(), - builder: (context, snapshot) { - if (snapshot.hasData && snapshot.data == true) { - return SettingsSwitchListTile( + if (isManageMediaSupported.value) + Column( + children: [ + SettingsSwitchListTile( enabled: true, valueNotifier: manageLocalMediaAndroid, title: "advanced_settings_sync_remote_deletions_title".tr(), @@ -71,14 +86,24 @@ class AdvancedSettings extends HookConsumerWidget { if (value) { final result = await ref.read(localFilesManagerRepositoryProvider).requestManageMediaPermission(); manageLocalMediaAndroid.value = result; + manageMediaAndroidPermission.value = result; } }, - ); - } else { - return const SizedBox.shrink(); - } - }, - ), + ), + SettingsActionTile( + title: "manage_media_access_title".tr(), + statusText: manageMediaAndroidPermission.value ? "allowed".tr() : "not_allowed".tr(), + subtitle: "manage_media_access_rationale".tr(), + statusColor: manageLocalMediaAndroid.value && !manageMediaAndroidPermission.value + ? const Color.fromARGB(255, 243, 188, 106) + : null, + onActionTap: () async { + final result = await ref.read(localFilesManagerRepositoryProvider).manageMediaPermission(); + manageMediaAndroidPermission.value = result; + }, + ), + ], + ), SettingsSliderListTile( text: "advanced_settings_log_level_title".tr(namedArgs: {'level': logLevel}), valueNotifier: levelId, diff --git a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart index a5bca24f81..0296a6bd99 100644 --- a/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart +++ b/mobile/lib/widgets/settings/beta_sync_settings/sync_status_and_actions.dart @@ -3,14 +3,18 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; +import 'package:immich_mobile/extensions/platform_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; +import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/providers/background_sync.provider.dart'; import 'package:immich_mobile/providers/infrastructure/album.provider.dart'; import 'package:immich_mobile/providers/infrastructure/asset.provider.dart'; import 'package:immich_mobile/providers/infrastructure/db.provider.dart'; import 'package:immich_mobile/providers/infrastructure/memory.provider.dart'; import 'package:immich_mobile/providers/infrastructure/storage.provider.dart'; +import 'package:immich_mobile/providers/infrastructure/trash_sync.provider.dart'; import 'package:immich_mobile/providers/sync_status.provider.dart'; +import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/beta_sync_settings/entity_count_tile.dart'; import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart'; @@ -229,6 +233,7 @@ class _SyncStatsCounts extends ConsumerWidget { final localAlbumService = ref.watch(localAlbumServiceProvider); final remoteAlbumService = ref.watch(remoteAlbumServiceProvider); final memoryService = ref.watch(driftMemoryServiceProvider); + final appSettingsService = ref.watch(appSettingsServiceProvider); Future> loadCounts() async { final assetCounts = assetService.getAssetCounts(); @@ -351,6 +356,44 @@ class _SyncStatsCounts extends ConsumerWidget { ], ), ), + // To be removed once the experimental feature is stable + if (CurrentPlatform.isAndroid && + appSettingsService.getSetting(AppSettingsEnum.manageLocalMediaAndroid)) ...[ + _SectionHeaderText(text: "trash".t(context: context)), + Consumer( + builder: (context, ref, _) { + final counts = ref.watch(trashedAssetsCountProvider); + return counts.when( + data: (c) => Padding( + padding: const EdgeInsets.fromLTRB(16, 8, 16, 16), + child: Flex( + direction: Axis.horizontal, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + spacing: 8.0, + children: [ + Expanded( + child: EntitiyCountTile( + label: "local".t(context: context), + count: c.total, + icon: Icons.delete_outline, + ), + ), + Expanded( + child: EntitiyCountTile( + label: "hashed_assets".t(context: context), + count: c.hashed, + icon: Icons.tag, + ), + ), + ], + ), + ), + loading: () => const CircularProgressIndicator(), + error: (e, st) => Text('Error: $e'), + ); + }, + ), + ], ], ); }, diff --git a/mobile/lib/widgets/settings/settings_action_tile.dart b/mobile/lib/widgets/settings/settings_action_tile.dart new file mode 100644 index 0000000000..b2b5988fa5 --- /dev/null +++ b/mobile/lib/widgets/settings/settings_action_tile.dart @@ -0,0 +1,73 @@ +import 'package:flutter/material.dart'; +import 'package:immich_mobile/extensions/theme_extensions.dart'; + +class SettingsActionTile extends StatelessWidget { + const SettingsActionTile({ + super.key, + required this.title, + required this.subtitle, + required this.onActionTap, + this.statusText, + this.statusColor, + this.contentPadding, + this.titleStyle, + this.subtitleStyle, + }); + + final String title; + final String subtitle; + final String? statusText; + final Color? statusColor; + final VoidCallback onActionTap; + final EdgeInsets? contentPadding; + final TextStyle? titleStyle; + final TextStyle? subtitleStyle; + + @override + Widget build(BuildContext context) { + final theme = Theme.of(context); + + return ListTile( + isThreeLine: true, + onTap: onActionTap, + titleAlignment: ListTileTitleAlignment.center, + title: Row( + children: [ + Expanded( + child: Text( + title, + style: titleStyle ?? theme.textTheme.bodyLarge?.copyWith(fontWeight: FontWeight.w500, height: 1.5), + ), + ), + if (statusText != null) + Padding( + padding: const EdgeInsets.only(left: 8), + child: Chip( + label: Text( + statusText!, + style: theme.textTheme.labelMedium?.copyWith( + color: statusColor ?? theme.colorScheme.onSurfaceVariant, + ), + ), + backgroundColor: theme.colorScheme.surface, + side: BorderSide(color: statusColor ?? theme.colorScheme.outlineVariant), + shape: StadiumBorder(side: BorderSide(color: statusColor ?? theme.colorScheme.outlineVariant)), + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + visualDensity: VisualDensity.compact, + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 0), + ), + ), + ], + ), + subtitle: Padding( + padding: const EdgeInsets.only(top: 4.0, right: 18.0), + child: Text( + subtitle, + style: subtitleStyle ?? theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.onSurfaceSecondary), + ), + ), + trailing: Icon(Icons.arrow_forward_ios, size: 16, color: theme.colorScheme.onSurfaceVariant), + contentPadding: contentPadding ?? const EdgeInsets.symmetric(horizontal: 20.0, vertical: 8.0), + ); + } +} diff --git a/mobile/mise.toml b/mobile/mise.toml new file mode 100644 index 0000000000..cdafd1cc18 --- /dev/null +++ b/mobile/mise.toml @@ -0,0 +1,185 @@ +[tools] +flutter = "3.35.7" + +[tools."github:CQLabs/homebrew-dcm"] +version = "1.30.0" +bin = "dcm" +postinstall = "chmod +x $MISE_TOOL_INSTALL_PATH/dcm" + +[tasks."codegen:dart"] +alias = "codegen" +description = "Execute build_runner to auto-generate dart code" +sources = [ + "pubspec.yaml", + "build.yaml", + "lib/**/*.dart", + "infrastructure/**/*.drift", +] +outputs = { auto = true } +run = "dart run build_runner build --delete-conflicting-outputs" + +[tasks."codegen:pigeon"] +alias = "pigeon" +description = "Generate pigeon platform code" +depends = [ + "pigeon:native-sync", + "pigeon:thumbnail", + "pigeon:background-worker", + "pigeon:background-worker-lock", + "pigeon:connectivity", +] + +[tasks."codegen:translation"] +alias = "translation" +description = "Generate translations from i18n JSONs" +run = [ + { task = "//i18n:format-fix" }, + { tasks = [ + "i18n:loader", + "i18n:keys", + ] }, +] + +[tasks."codegen:app-icon"] +description = "Generate app icons" +run = "flutter pub run flutter_launcher_icons:main" + +[tasks."codegen:splash"] +description = "Generate splash screen" +run = "flutter pub run flutter_native_splash:create" + +[tasks.test] +description = "Run mobile tests" +run = "flutter test" + +[tasks.lint] +description = "Analyze Dart code" +depends = ["analyze:dart", "analyze:dcm"] + +[tasks."lint-fix"] +description = "Auto-fix Dart code" +depends = ["analyze:fix:dart", "analyze:fix:dcm"] + +[tasks.format] +description = "Format Dart code" +run = "dart format --set-exit-if-changed $(find lib -name '*.dart' -not \\( -name '*.g.dart' -o -name '*.drift.dart' -o -name '*.gr.dart' \\))" + +[tasks."build:android"] +description = "Build Android release" +run = "flutter build appbundle" + +[tasks."drift:migration"] +alias = "migration" +description = "Generate database migrations" +run = "dart run drift_dev make-migrations" + + +# Internal tasks +[tasks."pigeon:native-sync"] +description = "Generate native sync API pigeon code" +hide = true +sources = ["pigeon/native_sync_api.dart"] +outputs = [ + "lib/platform/native_sync_api.g.dart", + "ios/Runner/Sync/Messages.g.swift", + "android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt", +] +run = [ + "dart run pigeon --input pigeon/native_sync_api.dart", + "dart format lib/platform/native_sync_api.g.dart", +] + +[tasks."pigeon:thumbnail"] +description = "Generate thumbnail API pigeon code" +hide = true +sources = ["pigeon/thumbnail_api.dart"] +outputs = [ + "lib/platform/thumbnail_api.g.dart", + "ios/Runner/Images/Thumbnails.g.swift", + "android/app/src/main/kotlin/app/alextran/immich/images/Thumbnails.g.kt", +] +run = [ + "dart run pigeon --input pigeon/thumbnail_api.dart", + "dart format lib/platform/thumbnail_api.g.dart", +] + +[tasks."pigeon:background-worker"] +description = "Generate background worker API pigeon code" +hide = true +sources = ["pigeon/background_worker_api.dart"] +outputs = [ + "lib/platform/background_worker_api.g.dart", + "ios/Runner/Background/BackgroundWorker.g.swift", + "android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorker.g.kt", +] +run = [ + "dart run pigeon --input pigeon/background_worker_api.dart", + "dart format lib/platform/background_worker_api.g.dart", +] + +[tasks."pigeon:background-worker-lock"] +description = "Generate background worker lock API pigeon code" +hide = true +sources = ["pigeon/background_worker_lock_api.dart"] +outputs = [ + "lib/platform/background_worker_lock_api.g.dart", + "android/app/src/main/kotlin/app/alextran/immich/background/BackgroundWorkerLock.g.kt", +] +run = [ + "dart run pigeon --input pigeon/background_worker_lock_api.dart", + "dart format lib/platform/background_worker_lock_api.g.dart", +] + +[tasks."pigeon:connectivity"] +description = "Generate connectivity API pigeon code" +hide = true +sources = ["pigeon/connectivity_api.dart"] +outputs = [ + "lib/platform/connectivity_api.g.dart", + "ios/Runner/Connectivity/Connectivity.g.swift", + "android/app/src/main/kotlin/app/alextran/immich/connectivity/Connectivity.g.kt", +] +run = [ + "dart run pigeon --input pigeon/connectivity_api.dart", + "dart format lib/platform/connectivity_api.g.dart", +] + +[tasks."i18n:loader"] +description = "Generate i18n loader" +hide = true +sources = ["i18n/"] +outputs = "lib/generated/codegen_loader.g.dart" +run = [ + "dart run easy_localization:generate -S ../i18n", + "dart format lib/generated/codegen_loader.g.dart", +] + +[tasks."i18n:keys"] +description = "Generate i18n keys" +hide = true +sources = ["i18n/en.json"] +outputs = "lib/generated/intl_keys.g.dart" +run = [ + "dart run bin/generate_keys.dart", + "dart format lib/generated/intl_keys.g.dart", +] + +[tasks."analyze:dart"] +description = "Run Dart analysis" +hide = true +run = "dart analyze --fatal-infos" + +[tasks."analyze:dcm"] +description = "Run Dart Code Metrics" +hide = true +run = "dcm analyze lib --fatal-style --fatal-warnings" + +[tasks."analyze:fix:dart"] +description = "Auto-fix Dart analysis" +hide = true +run = "dart fix --apply" + +[tasks."analyze:fix:dcm"] +description = "Auto-fix Dart Code Metrics" +hide = true +run = "dcm fix lib" diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md index 6302deef59..f18d675393 100644 --- a/mobile/openapi/README.md +++ b/mobile/openapi/README.md @@ -3,7 +3,7 @@ Immich API This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 2.2.0 +- API version: 2.2.3 - Generator version: 7.8.0 - Build package: org.openapitools.codegen.languages.DartClientCodegen @@ -73,228 +73,231 @@ All URIs are relative to */api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | -*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | -*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | -*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | -*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | -*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | -*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | -*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | -*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | -*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | -*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | -*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | -*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | -*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | -*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | -*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | -*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | -*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | -*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | -*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | -*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | -*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | -*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | checkBulkUpload -*AssetsApi* | [**checkExistingAssets**](doc//AssetsApi.md#checkexistingassets) | **POST** /assets/exist | checkExistingAssets -*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | -*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | -*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | -*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | -*AssetsApi* | [**getAllUserAssetsByDeviceId**](doc//AssetsApi.md#getalluserassetsbydeviceid) | **GET** /assets/device/{deviceId} | getAllUserAssetsByDeviceId -*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | -*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | -*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | -*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | -*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | -*AssetsApi* | [**getRandom**](doc//AssetsApi.md#getrandom) | **GET** /assets/random | -*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | -*AssetsApi* | [**replaceAsset**](doc//AssetsApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace the asset with new file, without changing its id -*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | -*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | -*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | -*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | -*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | -*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | -*AuthAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | -*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | -*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | -*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | -*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | -*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | -*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | -*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | -*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | -*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | -*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | -*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | -*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | -*DeprecatedApi* | [**getRandom**](doc//DeprecatedApi.md#getrandom) | **GET** /assets/random | -*DeprecatedApi* | [**replaceAsset**](doc//DeprecatedApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace the asset with new file, without changing its id -*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | -*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | -*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | -*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | -*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | -*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | -*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | -*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | -*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | -*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | -*JobsApi* | [**getAllJobsStatus**](doc//JobsApi.md#getalljobsstatus) | **GET** /jobs | -*JobsApi* | [**sendJobCommand**](doc//JobsApi.md#sendjobcommand) | **PUT** /jobs/{id} | -*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | -*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | -*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | -*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | -*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | -*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | -*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | -*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | +*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | Create an API key +*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | Delete an API key +*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | Retrieve an API key +*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | List all API keys +*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | Retrieve the current API key +*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key +*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | Create an activity +*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | Delete an activity +*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | List all activities +*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | Retrieve activity statistics +*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | Add assets to an album +*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | Add assets to albums +*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | Share album with users +*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | Create an album +*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | Delete an album +*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | Retrieve an album +*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | Retrieve album statistics +*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | List all albums +*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | Remove assets from an album +*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | Remove user from album +*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | Update an album +*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | Update user role +*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | Check bulk upload +*AssetsApi* | [**checkExistingAssets**](doc//AssetsApi.md#checkexistingassets) | **POST** /assets/exist | Check existing assets +*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | Copy asset +*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | Delete asset metadata by key +*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | Delete assets +*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | Download original asset +*AssetsApi* | [**getAllUserAssetsByDeviceId**](doc//AssetsApi.md#getalluserassetsbydeviceid) | **GET** /assets/device/{deviceId} | Retrieve assets by device ID +*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | Retrieve an asset +*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | Get asset metadata +*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | Retrieve asset metadata by key +*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | Retrieve asset OCR data +*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | Get asset statistics +*AssetsApi* | [**getRandom**](doc//AssetsApi.md#getrandom) | **GET** /assets/random | Get random assets +*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | Play asset video +*AssetsApi* | [**replaceAsset**](doc//AssetsApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace asset +*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | Run an asset job +*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | Update an asset +*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | Update asset metadata +*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | Update assets +*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | Upload asset +*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | View asset thumbnail +*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password +*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | Change pin code +*AuthenticationApi* | [**finishOAuth**](doc//AuthenticationApi.md#finishoauth) | **POST** /oauth/callback | Finish OAuth +*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | Retrieve auth status +*AuthenticationApi* | [**linkOAuthAccount**](doc//AuthenticationApi.md#linkoauthaccount) | **POST** /oauth/link | Link OAuth account +*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | Lock auth session +*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | Login +*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | Logout +*AuthenticationApi* | [**redirectOAuthToMobile**](doc//AuthenticationApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | Redirect OAuth to mobile +*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | Reset pin code +*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | Setup pin code +*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | Register admin +*AuthenticationApi* | [**startOAuth**](doc//AuthenticationApi.md#startoauth) | **POST** /oauth/authorize | Start OAuth +*AuthenticationApi* | [**unlinkOAuthAccount**](doc//AuthenticationApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | Unlink OAuth account +*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | Unlock auth session +*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token +*AuthenticationAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthenticationAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | Unlink all OAuth accounts +*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner +*DeprecatedApi* | [**getAllUserAssetsByDeviceId**](doc//DeprecatedApi.md#getalluserassetsbydeviceid) | **GET** /assets/device/{deviceId} | Retrieve assets by device ID +*DeprecatedApi* | [**getDeltaSync**](doc//DeprecatedApi.md#getdeltasync) | **POST** /sync/delta-sync | Get delta sync for user +*DeprecatedApi* | [**getFullSyncForUser**](doc//DeprecatedApi.md#getfullsyncforuser) | **POST** /sync/full-sync | Get full sync for user +*DeprecatedApi* | [**getRandom**](doc//DeprecatedApi.md#getrandom) | **GET** /assets/random | Get random assets +*DeprecatedApi* | [**replaceAsset**](doc//DeprecatedApi.md#replaceasset) | **PUT** /assets/{id}/original | Replace asset +*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive +*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information +*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Delete a duplicate +*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates +*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates +*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | Create a face +*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | Delete a face +*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | Retrieve faces for asset +*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | Re-assign a face to another person +*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | Create a manual job +*JobsApi* | [**getAllJobsStatus**](doc//JobsApi.md#getalljobsstatus) | **GET** /jobs | Retrieve queue counts and status +*JobsApi* | [**sendJobCommand**](doc//JobsApi.md#sendjobcommand) | **PUT** /jobs/{id} | Run jobs +*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | Create a library +*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | Delete a library +*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | Retrieve libraries +*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | Retrieve a library +*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | Retrieve library statistics +*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | Scan a library +*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library +*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | Validate library settings *MaintenanceAdminApi* | [**endMaintenance**](doc//MaintenanceAdminApi.md#endmaintenance) | **POST** /admin/maintenance/end | *MaintenanceAdminApi* | [**maintenanceLogin**](doc//MaintenanceAdminApi.md#maintenancelogin) | **POST** /admin/maintenance/login | *MaintenanceAdminApi* | [**startMaintenance**](doc//MaintenanceAdminApi.md#startmaintenance) | **POST** /admin/maintenance/start | -*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | -*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | -*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | -*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | -*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | -*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | -*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | -*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | -*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | -*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | -*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | -*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | -*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | -*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | -*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | -*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | -*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | -*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | -*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | -*OAuthApi* | [**finishOAuth**](doc//OAuthApi.md#finishoauth) | **POST** /oauth/callback | -*OAuthApi* | [**linkOAuthAccount**](doc//OAuthApi.md#linkoauthaccount) | **POST** /oauth/link | -*OAuthApi* | [**redirectOAuthToMobile**](doc//OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | -*OAuthApi* | [**startOAuth**](doc//OAuthApi.md#startoauth) | **POST** /oauth/authorize | -*OAuthApi* | [**unlinkOAuthAccount**](doc//OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | -*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | -*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | -*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | -*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | -*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | -*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | -*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | -*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | -*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | -*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | -*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | -*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | -*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | -*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | -*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | -*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | -*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | -*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | -*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | -*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | -*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | -*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | -*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | -*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | -*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | -*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | -*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | -*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | -*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | -*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | -*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | -*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | -*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | -*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | -*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | -*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | -*ServerApi* | [**getTheme**](doc//ServerApi.md#gettheme) | **GET** /server/theme | -*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | -*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | -*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | -*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | -*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | -*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | -*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | -*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | -*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | -*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | -*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | -*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | -*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | -*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | -*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | -*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | -*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | -*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | -*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | -*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | -*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | -*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | -*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | -*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | -*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | -*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | -*SyncApi* | [**getDeltaSync**](doc//SyncApi.md#getdeltasync) | **POST** /sync/delta-sync | -*SyncApi* | [**getFullSyncForUser**](doc//SyncApi.md#getfullsyncforuser) | **POST** /sync/full-sync | -*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | -*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | -*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | -*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | -*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | -*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | -*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | -*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | -*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | -*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | -*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | -*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | -*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | -*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | -*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | -*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | -*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | -*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | -*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | -*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | -*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | -*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | -*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | -*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | -*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | -*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | -*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | -*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | -*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | -*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | -*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | -*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | -*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | -*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | -*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | -*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | -*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | -*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | -*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | -*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | -*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | -*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | -*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | -*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | -*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | -*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | -*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | -*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | -*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | -*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | -*ViewApi* | [**getAssetsByOriginalPath**](doc//ViewApi.md#getassetsbyoriginalpath) | **GET** /view/folder | -*ViewApi* | [**getUniqueOriginalPaths**](doc//ViewApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | +*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | Retrieve map markers +*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | Reverse geocode coordinates +*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | Add assets to a memory +*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | Create a memory +*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | Delete a memory +*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | Retrieve a memory +*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | Retrieve memories statistics +*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | Remove assets from a memory +*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | Retrieve memories +*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | Update a memory +*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | Delete a notification +*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | Delete notifications +*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | Get a notification +*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | Retrieve notifications +*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | Update a notification +*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | Update notifications +*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | Create a notification +*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | Render email template +*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | Send test email +*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | Create a partner +*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner +*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | Retrieve partners +*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | Remove a partner +*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | Update a partner +*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | Create a person +*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | Delete people +*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | Delete person +*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | Get all people +*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | Get a person +*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | Get person statistics +*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | Get person thumbnail +*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | Merge people +*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | Reassign faces +*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | Update people +*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | Update person +*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | Retrieve assets by city +*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | Retrieve explore data +*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | Retrieve search suggestions +*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | Search asset statistics +*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | Search assets by metadata +*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | Search large assets +*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | Search people +*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | Search places +*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | Search random assets +*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | Smart asset search +*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | Delete server product key +*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | Get server information +*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | Get APK links +*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | Get config +*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | Get features +*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | Get product key +*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | Get statistics +*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version +*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | Get storage +*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | Get supported media types +*ServerApi* | [**getTheme**](doc//ServerApi.md#gettheme) | **GET** /server/theme | Get theme +*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | Get version check status +*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | Get version history +*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping +*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | Set server product key +*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | Create a session +*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | Delete all sessions +*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | Delete a session +*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | Retrieve sessions +*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | Lock a session +*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | Update a session +*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | Add assets to a shared link +*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | Create a shared link +*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | Retrieve all shared links +*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | Retrieve current shared link +*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | Retrieve a shared link +*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | Delete a shared link +*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | Remove assets from a shared link +*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | Update a shared link +*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | Create a stack +*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | Delete a stack +*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | Delete stacks +*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | Retrieve a stack +*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | Remove an asset from a stack +*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | Retrieve stacks +*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack +*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | Delete acknowledgements +*SyncApi* | [**getDeltaSync**](doc//SyncApi.md#getdeltasync) | **POST** /sync/delta-sync | Get delta sync for user +*SyncApi* | [**getFullSyncForUser**](doc//SyncApi.md#getfullsyncforuser) | **POST** /sync/full-sync | Get full sync for user +*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | Retrieve acknowledgements +*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | Stream sync changes +*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | Acknowledge changes +*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | Get system configuration +*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | Get system configuration defaults +*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | Get storage template options +*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | Update system configuration +*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | Retrieve admin onboarding +*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | Retrieve reverse geocoding state +*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | Retrieve version check state +*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | Update admin onboarding +*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | Tag assets +*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | Create a tag +*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | Delete a tag +*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | Retrieve tags +*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | Retrieve a tag +*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | Tag assets +*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | Untag assets +*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | Update a tag +*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | Upsert tags +*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | Get time bucket +*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | Get time buckets +*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | Empty trash +*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | Restore assets +*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | Restore trash +*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | Create user profile image +*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | Delete user profile image +*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | Delete user product key +*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | Delete user onboarding +*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | Get my preferences +*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | Get current user +*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | Retrieve user profile image +*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | Retrieve a user +*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | Retrieve user product key +*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | Retrieve user onboarding +*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | Get all users +*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | Set user product key +*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | Update user onboarding +*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences +*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | Update current user +*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | Create a user +*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | Delete a user +*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | Retrieve a user +*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | Retrieve user preferences +*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | Retrieve user sessions +*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | Retrieve user statistics +*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | Restore a deleted user +*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | Search users +*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user +*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences +*ViewsApi* | [**getAssetsByOriginalPath**](doc//ViewsApi.md#getassetsbyoriginalpath) | **GET** /view/folder | Retrieve assets by original path +*ViewsApi* | [**getUniqueOriginalPaths**](doc//ViewsApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | Retrieve unique paths ## Documentation For Models @@ -412,6 +415,7 @@ Class | Method | HTTP request | Description - [MemoriesUpdate](doc//MemoriesUpdate.md) - [MemoryCreateDto](doc//MemoryCreateDto.md) - [MemoryResponseDto](doc//MemoryResponseDto.md) + - [MemorySearchOrder](doc//MemorySearchOrder.md) - [MemoryStatisticsResponseDto](doc//MemoryStatisticsResponseDto.md) - [MemoryType](doc//MemoryType.md) - [MemoryUpdateDto](doc//MemoryUpdateDto.md) diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart index a033d2e740..962afda6c9 100644 --- a/mobile/openapi/lib/api.dart +++ b/mobile/openapi/lib/api.dart @@ -34,8 +34,8 @@ part 'api/api_keys_api.dart'; part 'api/activities_api.dart'; part 'api/albums_api.dart'; part 'api/assets_api.dart'; -part 'api/auth_admin_api.dart'; part 'api/authentication_api.dart'; +part 'api/authentication_admin_api.dart'; part 'api/deprecated_api.dart'; part 'api/download_api.dart'; part 'api/duplicates_api.dart'; @@ -47,7 +47,6 @@ part 'api/map_api.dart'; part 'api/memories_api.dart'; part 'api/notifications_api.dart'; part 'api/notifications_admin_api.dart'; -part 'api/o_auth_api.dart'; part 'api/partners_api.dart'; part 'api/people_api.dart'; part 'api/search_api.dart'; @@ -63,7 +62,7 @@ part 'api/timeline_api.dart'; part 'api/trash_api.dart'; part 'api/users_api.dart'; part 'api/users_admin_api.dart'; -part 'api/view_api.dart'; +part 'api/views_api.dart'; part 'model/api_key_create_dto.dart'; part 'model/api_key_create_response_dto.dart'; @@ -178,6 +177,7 @@ part 'model/memories_response.dart'; part 'model/memories_update.dart'; part 'model/memory_create_dto.dart'; part 'model/memory_response_dto.dart'; +part 'model/memory_search_order.dart'; part 'model/memory_statistics_response_dto.dart'; part 'model/memory_type.dart'; part 'model/memory_update_dto.dart'; diff --git a/mobile/openapi/lib/api/activities_api.dart b/mobile/openapi/lib/api/activities_api.dart index 67015499fa..b92f95be72 100644 --- a/mobile/openapi/lib/api/activities_api.dart +++ b/mobile/openapi/lib/api/activities_api.dart @@ -16,7 +16,9 @@ class ActivitiesApi { final ApiClient apiClient; - /// This endpoint requires the `activity.create` permission. + /// Create an activity + /// + /// Create a like or a comment for an album, or an asset in an album. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.create` permission. + /// Create an activity + /// + /// Create a like or a comment for an album, or an asset in an album. /// /// Parameters: /// @@ -68,7 +72,9 @@ class ActivitiesApi { return null; } - /// This endpoint requires the `activity.delete` permission. + /// Delete an activity + /// + /// Removes a like or comment from a given album or asset in an album. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.delete` permission. + /// Delete an activity + /// + /// Removes a like or comment from a given album or asset in an album. /// /// Parameters: /// @@ -113,7 +121,9 @@ class ActivitiesApi { } } - /// This endpoint requires the `activity.read` permission. + /// List all activities + /// + /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. /// /// Note: This method returns the HTTP [Response]. /// @@ -167,7 +177,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.read` permission. + /// List all activities + /// + /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. /// /// Parameters: /// @@ -198,7 +210,9 @@ class ActivitiesApi { return null; } - /// This endpoint requires the `activity.statistics` permission. + /// Retrieve activity statistics + /// + /// Returns the number of likes and comments for a given album or asset in an album. /// /// Note: This method returns the HTTP [Response]. /// @@ -237,7 +251,9 @@ class ActivitiesApi { ); } - /// This endpoint requires the `activity.statistics` permission. + /// Retrieve activity statistics + /// + /// Returns the number of likes and comments for a given album or asset in an album. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/albums_api.dart b/mobile/openapi/lib/api/albums_api.dart index a45083669c..1042a2850f 100644 --- a/mobile/openapi/lib/api/albums_api.dart +++ b/mobile/openapi/lib/api/albums_api.dart @@ -16,7 +16,9 @@ class AlbumsApi { final ApiClient apiClient; - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to an album + /// + /// Add multiple assets to a specific album by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -62,7 +64,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to an album + /// + /// Add multiple assets to a specific album by its ID. /// /// Parameters: /// @@ -91,7 +95,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to albums + /// + /// Send a list of asset IDs and album IDs to add each asset to each album. /// /// Note: This method returns the HTTP [Response]. /// @@ -134,7 +140,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumAsset.create` permission. + /// Add assets to albums + /// + /// Send a list of asset IDs and album IDs to add each asset to each album. /// /// Parameters: /// @@ -158,7 +166,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumUser.create` permission. + /// Share album with users + /// + /// Share an album with multiple users. Each user can be given a specific role in the album. /// /// Note: This method returns the HTTP [Response]. /// @@ -193,7 +203,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumUser.create` permission. + /// Share album with users + /// + /// Share an album with multiple users. Each user can be given a specific role in the album. /// /// Parameters: /// @@ -215,7 +227,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.create` permission. + /// Create an album + /// + /// Create a new album. The album can also be created with initial users and assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -247,7 +261,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.create` permission. + /// Create an album + /// + /// Create a new album. The album can also be created with initial users and assets. /// /// Parameters: /// @@ -267,7 +283,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.delete` permission. + /// Delete an album + /// + /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. /// /// Note: This method returns the HTTP [Response]. /// @@ -300,7 +318,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.delete` permission. + /// Delete an album + /// + /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. /// /// Parameters: /// @@ -312,7 +332,9 @@ class AlbumsApi { } } - /// This endpoint requires the `album.read` permission. + /// Retrieve an album + /// + /// Retrieve information about a specific album by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -361,7 +383,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.read` permission. + /// Retrieve an album + /// + /// Retrieve information about a specific album by its ID. /// /// Parameters: /// @@ -387,7 +411,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.statistics` permission. + /// Retrieve album statistics + /// + /// Returns statistics about the albums available to the authenticated user. /// /// Note: This method returns the HTTP [Response]. Future getAlbumStatisticsWithHttpInfo() async { @@ -415,7 +441,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.statistics` permission. + /// Retrieve album statistics + /// + /// Returns statistics about the albums available to the authenticated user. Future getAlbumStatistics() async { final response = await getAlbumStatisticsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -431,7 +459,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `album.read` permission. + /// List all albums + /// + /// Retrieve a list of albums available to the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -473,7 +503,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.read` permission. + /// List all albums + /// + /// Retrieve a list of albums available to the authenticated user. /// /// Parameters: /// @@ -499,7 +531,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumAsset.delete` permission. + /// Remove assets from an album + /// + /// Remove multiple assets from a specific album by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -534,7 +568,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumAsset.delete` permission. + /// Remove assets from an album + /// + /// Remove multiple assets from a specific album by its ID. /// /// Parameters: /// @@ -559,7 +595,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumUser.delete` permission. + /// Remove user from album + /// + /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. /// /// Note: This method returns the HTTP [Response]. /// @@ -595,7 +633,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumUser.delete` permission. + /// Remove user from album + /// + /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. /// /// Parameters: /// @@ -609,7 +649,9 @@ class AlbumsApi { } } - /// This endpoint requires the `album.update` permission. + /// Update an album + /// + /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. /// /// Note: This method returns the HTTP [Response]. /// @@ -644,7 +686,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `album.update` permission. + /// Update an album + /// + /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. /// /// Parameters: /// @@ -666,7 +710,9 @@ class AlbumsApi { return null; } - /// This endpoint requires the `albumUser.update` permission. + /// Update user role + /// + /// Change the role for a specific user in a specific album. /// /// Note: This method returns the HTTP [Response]. /// @@ -704,7 +750,9 @@ class AlbumsApi { ); } - /// This endpoint requires the `albumUser.update` permission. + /// Update user role + /// + /// Change the role for a specific user in a specific album. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/api_keys_api.dart b/mobile/openapi/lib/api/api_keys_api.dart index 3ac829c30c..0bd26575c6 100644 --- a/mobile/openapi/lib/api/api_keys_api.dart +++ b/mobile/openapi/lib/api/api_keys_api.dart @@ -16,7 +16,9 @@ class APIKeysApi { final ApiClient apiClient; - /// This endpoint requires the `apiKey.create` permission. + /// Create an API key + /// + /// Creates a new API key. It will be limited to the permissions specified. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.create` permission. + /// Create an API key + /// + /// Creates a new API key. It will be limited to the permissions specified. /// /// Parameters: /// @@ -68,7 +72,9 @@ class APIKeysApi { return null; } - /// This endpoint requires the `apiKey.delete` permission. + /// Delete an API key + /// + /// Deletes an API key identified by its ID. The current user must own this API key. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.delete` permission. + /// Delete an API key + /// + /// Deletes an API key identified by its ID. The current user must own this API key. /// /// Parameters: /// @@ -113,7 +121,9 @@ class APIKeysApi { } } - /// This endpoint requires the `apiKey.read` permission. + /// Retrieve an API key + /// + /// Retrieve an API key by its ID. The current user must own this API key. /// /// Note: This method returns the HTTP [Response]. /// @@ -146,7 +156,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.read` permission. + /// Retrieve an API key + /// + /// Retrieve an API key by its ID. The current user must own this API key. /// /// Parameters: /// @@ -166,7 +178,9 @@ class APIKeysApi { return null; } - /// This endpoint requires the `apiKey.read` permission. + /// List all API keys + /// + /// Retrieve all API keys of the current user. /// /// Note: This method returns the HTTP [Response]. Future getApiKeysWithHttpInfo() async { @@ -194,7 +208,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.read` permission. + /// List all API keys + /// + /// Retrieve all API keys of the current user. Future?> getApiKeys() async { final response = await getApiKeysWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -213,7 +229,11 @@ class APIKeysApi { return null; } - /// Performs an HTTP 'GET /api-keys/me' operation and returns the [Response]. + /// Retrieve the current API key + /// + /// Retrieve the API key that is used to access this endpoint. + /// + /// Note: This method returns the HTTP [Response]. Future getMyApiKeyWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/api-keys/me'; @@ -239,6 +259,9 @@ class APIKeysApi { ); } + /// Retrieve the current API key + /// + /// Retrieve the API key that is used to access this endpoint. Future getMyApiKey() async { final response = await getMyApiKeyWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -254,7 +277,9 @@ class APIKeysApi { return null; } - /// This endpoint requires the `apiKey.update` permission. + /// Update an API key + /// + /// Updates the name and permissions of an API key by its ID. The current user must own this API key. /// /// Note: This method returns the HTTP [Response]. /// @@ -289,7 +314,9 @@ class APIKeysApi { ); } - /// This endpoint requires the `apiKey.update` permission. + /// Update an API key + /// + /// Updates the name and permissions of an API key by its ID. The current user must own this API key. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/assets_api.dart b/mobile/openapi/lib/api/assets_api.dart index 7bae14bb58..fdb171bedc 100644 --- a/mobile/openapi/lib/api/assets_api.dart +++ b/mobile/openapi/lib/api/assets_api.dart @@ -16,9 +16,9 @@ class AssetsApi { final ApiClient apiClient; - /// checkBulkUpload + /// Check bulk upload /// - /// Checks if assets exist by checksums. This endpoint requires the `asset.upload` permission. + /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. /// /// Note: This method returns the HTTP [Response]. /// @@ -50,9 +50,9 @@ class AssetsApi { ); } - /// checkBulkUpload + /// Check bulk upload /// - /// Checks if assets exist by checksums. This endpoint requires the `asset.upload` permission. + /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. /// /// Parameters: /// @@ -72,7 +72,7 @@ class AssetsApi { return null; } - /// checkExistingAssets + /// Check existing assets /// /// Checks if multiple assets exist on the server and returns all existing - used by background backup /// @@ -106,7 +106,7 @@ class AssetsApi { ); } - /// checkExistingAssets + /// Check existing assets /// /// Checks if multiple assets exist on the server and returns all existing - used by background backup /// @@ -128,7 +128,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.copy` permission. + /// Copy asset + /// + /// Copy asset information like albums, tags, etc. from one asset to another. /// /// Note: This method returns the HTTP [Response]. /// @@ -160,7 +162,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.copy` permission. + /// Copy asset + /// + /// Copy asset information like albums, tags, etc. from one asset to another. /// /// Parameters: /// @@ -172,7 +176,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.update` permission. + /// Delete asset metadata by key + /// + /// Delete a specific metadata key-value pair associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -208,7 +214,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Delete asset metadata by key + /// + /// Delete a specific metadata key-value pair associated with the specified asset. /// /// Parameters: /// @@ -222,7 +230,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.delete` permission. + /// Delete assets + /// + /// Deletes multiple assets at the same time. /// /// Note: This method returns the HTTP [Response]. /// @@ -254,7 +264,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Delete assets + /// + /// Deletes multiple assets at the same time. /// /// Parameters: /// @@ -266,7 +278,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.download` permission. + /// Download original asset + /// + /// Downloads the original file of the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -310,7 +324,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.download` permission. + /// Download original asset + /// + /// Downloads the original file of the specified asset. /// /// Parameters: /// @@ -334,9 +350,9 @@ class AssetsApi { return null; } - /// getAllUserAssetsByDeviceId + /// Retrieve assets by device ID /// - /// Get all asset of a device that are in the database, ID only. + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. /// /// Note: This method returns the HTTP [Response]. /// @@ -369,9 +385,9 @@ class AssetsApi { ); } - /// getAllUserAssetsByDeviceId + /// Retrieve assets by device ID /// - /// Get all asset of a device that are in the database, ID only. + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. /// /// Parameters: /// @@ -394,7 +410,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve an asset + /// + /// Retrieve detailed information about a specific asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -438,7 +456,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve an asset + /// + /// Retrieve detailed information about a specific asset. /// /// Parameters: /// @@ -462,7 +482,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Get asset metadata + /// + /// Retrieve all metadata key-value pairs associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -495,7 +517,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Get asset metadata + /// + /// Retrieve all metadata key-value pairs associated with the specified asset. /// /// Parameters: /// @@ -518,7 +542,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset metadata by key + /// + /// Retrieve the value of a specific metadata key associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -554,7 +580,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset metadata by key + /// + /// Retrieve the value of a specific metadata key associated with the specified asset. /// /// Parameters: /// @@ -576,7 +604,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset OCR data + /// + /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -609,7 +639,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve asset OCR data + /// + /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. /// /// Parameters: /// @@ -632,7 +664,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.statistics` permission. + /// Get asset statistics + /// + /// Retrieve various statistics about the assets owned by the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -678,7 +712,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.statistics` permission. + /// Get asset statistics + /// + /// Retrieve various statistics about the assets owned by the authenticated user. /// /// Parameters: /// @@ -702,7 +738,9 @@ class AssetsApi { return null; } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -738,7 +776,9 @@ class AssetsApi { ); } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Parameters: /// @@ -761,7 +801,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.view` permission. + /// Play asset video + /// + /// Streams the video file for the specified asset. This endpoint also supports byte range requests. /// /// Note: This method returns the HTTP [Response]. /// @@ -805,7 +847,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.view` permission. + /// Play asset video + /// + /// Streams the video file for the specified asset. This endpoint also supports byte range requests. /// /// Parameters: /// @@ -829,9 +873,9 @@ class AssetsApi { return null; } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Note: This method returns the HTTP [Response]. /// @@ -923,9 +967,9 @@ class AssetsApi { ); } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Parameters: /// @@ -963,7 +1007,12 @@ class AssetsApi { return null; } - /// Performs an HTTP 'POST /assets/jobs' operation and returns the [Response]. + /// Run an asset job + /// + /// Run a specific job on a set of assets. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AssetJobsDto] assetJobsDto (required): @@ -992,6 +1041,10 @@ class AssetsApi { ); } + /// Run an asset job + /// + /// Run a specific job on a set of assets. + /// /// Parameters: /// /// * [AssetJobsDto] assetJobsDto (required): @@ -1002,7 +1055,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.update` permission. + /// Update an asset + /// + /// Update information of a specific asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -1037,7 +1092,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Update an asset + /// + /// Update information of a specific asset. /// /// Parameters: /// @@ -1059,7 +1116,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.update` permission. + /// Update asset metadata + /// + /// Update or add metadata key-value pairs for the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -1094,7 +1153,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Update asset metadata + /// + /// Update or add metadata key-value pairs for the specified asset. /// /// Parameters: /// @@ -1119,7 +1180,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.update` permission. + /// Update assets + /// + /// Updates multiple assets at the same time. /// /// Note: This method returns the HTTP [Response]. /// @@ -1151,7 +1214,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.update` permission. + /// Update assets + /// + /// Updates multiple assets at the same time. /// /// Parameters: /// @@ -1163,7 +1228,9 @@ class AssetsApi { } } - /// This endpoint requires the `asset.upload` permission. + /// Upload asset + /// + /// Uploads a new asset to the server. /// /// Note: This method returns the HTTP [Response]. /// @@ -1290,7 +1357,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.upload` permission. + /// Upload asset + /// + /// Uploads a new asset to the server. /// /// Parameters: /// @@ -1339,7 +1408,9 @@ class AssetsApi { return null; } - /// This endpoint requires the `asset.view` permission. + /// View asset thumbnail + /// + /// Retrieve the thumbnail image for the specified asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -1388,7 +1459,9 @@ class AssetsApi { ); } - /// This endpoint requires the `asset.view` permission. + /// View asset thumbnail + /// + /// Retrieve the thumbnail image for the specified asset. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/auth_admin_api.dart b/mobile/openapi/lib/api/authentication_admin_api.dart similarity index 77% rename from mobile/openapi/lib/api/auth_admin_api.dart rename to mobile/openapi/lib/api/authentication_admin_api.dart index d22b449aab..0a4b91ebc3 100644 --- a/mobile/openapi/lib/api/auth_admin_api.dart +++ b/mobile/openapi/lib/api/authentication_admin_api.dart @@ -11,12 +11,14 @@ part of openapi.api; -class AuthAdminApi { - AuthAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; +class AuthenticationAdminApi { + AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission. + /// Unlink all OAuth accounts + /// + /// Unlinks all OAuth accounts associated with user accounts in the system. /// /// Note: This method returns the HTTP [Response]. Future unlinkAllOAuthAccountsAdminWithHttpInfo() async { @@ -44,7 +46,9 @@ class AuthAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission. + /// Unlink all OAuth accounts + /// + /// Unlinks all OAuth accounts associated with user accounts in the system. Future unlinkAllOAuthAccountsAdmin() async { final response = await unlinkAllOAuthAccountsAdminWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/authentication_api.dart b/mobile/openapi/lib/api/authentication_api.dart index a74af33a43..52d46a525b 100644 --- a/mobile/openapi/lib/api/authentication_api.dart +++ b/mobile/openapi/lib/api/authentication_api.dart @@ -16,7 +16,9 @@ class AuthenticationApi { final ApiClient apiClient; - /// This endpoint requires the `auth.changePassword` permission. + /// Change password + /// + /// Change the password of the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `auth.changePassword` permission. + /// Change password + /// + /// Change the password of the current user. /// /// Parameters: /// @@ -68,7 +72,9 @@ class AuthenticationApi { return null; } - /// This endpoint requires the `pinCode.update` permission. + /// Change pin code + /// + /// Change the pin code for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -100,7 +106,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `pinCode.update` permission. + /// Change pin code + /// + /// Change the pin code for the current user. /// /// Parameters: /// @@ -112,7 +120,67 @@ class AuthenticationApi { } } - /// Performs an HTTP 'GET /auth/status' operation and returns the [Response]. + /// Finish OAuth + /// + /// Complete the OAuth authorization process by exchanging the authorization code for a session token. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/callback'; + + // ignore: prefer_final_locals + Object? postBody = oAuthCallbackDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Finish OAuth + /// + /// Complete the OAuth authorization process by exchanging the authorization code for a session token. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async { + final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; + + } + return null; + } + + /// Retrieve auth status + /// + /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. + /// + /// Note: This method returns the HTTP [Response]. Future getAuthStatusWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/status'; @@ -138,6 +206,9 @@ class AuthenticationApi { ); } + /// Retrieve auth status + /// + /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. Future getAuthStatus() async { final response = await getAuthStatusWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -153,7 +224,67 @@ class AuthenticationApi { return null; } - /// Performs an HTTP 'POST /auth/session/lock' operation and returns the [Response]. + /// Link OAuth account + /// + /// Link an OAuth account to the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/link'; + + // ignore: prefer_final_locals + Object? postBody = oAuthCallbackDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Link OAuth account + /// + /// Link an OAuth account to the authenticated user. + /// + /// Parameters: + /// + /// * [OAuthCallbackDto] oAuthCallbackDto (required): + Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async { + final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; + + } + return null; + } + + /// Lock auth session + /// + /// Remove elevated access to locked assets from the current session. + /// + /// Note: This method returns the HTTP [Response]. Future lockAuthSessionWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/session/lock'; @@ -179,6 +310,9 @@ class AuthenticationApi { ); } + /// Lock auth session + /// + /// Remove elevated access to locked assets from the current session. Future lockAuthSession() async { final response = await lockAuthSessionWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -186,7 +320,12 @@ class AuthenticationApi { } } - /// Performs an HTTP 'POST /auth/login' operation and returns the [Response]. + /// Login + /// + /// Login with username and password and receive a session token. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [LoginCredentialDto] loginCredentialDto (required): @@ -215,6 +354,10 @@ class AuthenticationApi { ); } + /// Login + /// + /// Login with username and password and receive a session token. + /// /// Parameters: /// /// * [LoginCredentialDto] loginCredentialDto (required): @@ -233,7 +376,11 @@ class AuthenticationApi { return null; } - /// Performs an HTTP 'POST /auth/logout' operation and returns the [Response]. + /// Logout + /// + /// Logout the current user and invalidate the session token. + /// + /// Note: This method returns the HTTP [Response]. Future logoutWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/logout'; @@ -259,6 +406,9 @@ class AuthenticationApi { ); } + /// Logout + /// + /// Logout the current user and invalidate the session token. Future logout() async { final response = await logoutWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -274,7 +424,49 @@ class AuthenticationApi { return null; } - /// This endpoint requires the `pinCode.delete` permission. + /// Redirect OAuth to mobile + /// + /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. + /// + /// Note: This method returns the HTTP [Response]. + Future redirectOAuthToMobileWithHttpInfo() async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/mobile-redirect'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Redirect OAuth to mobile + /// + /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. + Future redirectOAuthToMobile() async { + final response = await redirectOAuthToMobileWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Reset pin code + /// + /// Reset the pin code for the current user by providing the account password /// /// Note: This method returns the HTTP [Response]. /// @@ -306,7 +498,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `pinCode.delete` permission. + /// Reset pin code + /// + /// Reset the pin code for the current user by providing the account password /// /// Parameters: /// @@ -318,7 +512,9 @@ class AuthenticationApi { } } - /// This endpoint requires the `pinCode.create` permission. + /// Setup pin code + /// + /// Setup a new pin code for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -350,7 +546,9 @@ class AuthenticationApi { ); } - /// This endpoint requires the `pinCode.create` permission. + /// Setup pin code + /// + /// Setup a new pin code for the current user. /// /// Parameters: /// @@ -362,7 +560,12 @@ class AuthenticationApi { } } - /// Performs an HTTP 'POST /auth/admin-sign-up' operation and returns the [Response]. + /// Register admin + /// + /// Create the first admin user in the system. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [SignUpDto] signUpDto (required): @@ -391,6 +594,10 @@ class AuthenticationApi { ); } + /// Register admin + /// + /// Create the first admin user in the system. + /// /// Parameters: /// /// * [SignUpDto] signUpDto (required): @@ -409,7 +616,116 @@ class AuthenticationApi { return null; } - /// Performs an HTTP 'POST /auth/session/unlock' operation and returns the [Response]. + /// Start OAuth + /// + /// Initiate the OAuth authorization process. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OAuthConfigDto] oAuthConfigDto (required): + Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/authorize'; + + // ignore: prefer_final_locals + Object? postBody = oAuthConfigDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Start OAuth + /// + /// Initiate the OAuth authorization process. + /// + /// Parameters: + /// + /// * [OAuthConfigDto] oAuthConfigDto (required): + Future startOAuth(OAuthConfigDto oAuthConfigDto,) async { + final response = await startOAuthWithHttpInfo(oAuthConfigDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto; + + } + return null; + } + + /// Unlink OAuth account + /// + /// Unlink the OAuth account from the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + Future unlinkOAuthAccountWithHttpInfo() async { + // ignore: prefer_const_declarations + final apiPath = r'/oauth/unlink'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Unlink OAuth account + /// + /// Unlink the OAuth account from the authenticated user. + Future unlinkOAuthAccount() async { + final response = await unlinkOAuthAccountWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; + + } + return null; + } + + /// Unlock auth session + /// + /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [SessionUnlockDto] sessionUnlockDto (required): @@ -438,6 +754,10 @@ class AuthenticationApi { ); } + /// Unlock auth session + /// + /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. + /// /// Parameters: /// /// * [SessionUnlockDto] sessionUnlockDto (required): @@ -448,7 +768,11 @@ class AuthenticationApi { } } - /// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response]. + /// Validate access token + /// + /// Validate the current authorization method is still valid. + /// + /// Note: This method returns the HTTP [Response]. Future validateAccessTokenWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/auth/validateToken'; @@ -474,6 +798,9 @@ class AuthenticationApi { ); } + /// Validate access token + /// + /// Validate the current authorization method is still valid. Future validateAccessToken() async { final response = await validateAccessTokenWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart index 9246998ca2..b47b26b148 100644 --- a/mobile/openapi/lib/api/deprecated_api.dart +++ b/mobile/openapi/lib/api/deprecated_api.dart @@ -16,7 +16,9 @@ class DeprecatedApi { final ApiClient apiClient; - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Note: This method returns the HTTP [Response]. /// @@ -49,7 +51,9 @@ class DeprecatedApi { ); } - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Parameters: /// @@ -69,7 +73,184 @@ class DeprecatedApi { return null; } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Retrieve assets by device ID + /// + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] deviceId (required): + Future getAllUserAssetsByDeviceIdWithHttpInfo(String deviceId,) async { + // ignore: prefer_const_declarations + final apiPath = r'/assets/device/{deviceId}' + .replaceAll('{deviceId}', deviceId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + apiPath, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Retrieve assets by device ID + /// + /// This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only. + /// + /// Parameters: + /// + /// * [String] deviceId (required): + Future?> getAllUserAssetsByDeviceId(String deviceId,) async { + final response = await getAllUserAssetsByDeviceIdWithHttpInfo(deviceId,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(growable: false); + + } + return null; + } + + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): + Future getDeltaSyncWithHttpInfo(AssetDeltaSyncDto assetDeltaSyncDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/sync/delta-sync'; + + // ignore: prefer_final_locals + Object? postBody = assetDeltaSyncDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// + /// Parameters: + /// + /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): + Future getDeltaSync(AssetDeltaSyncDto assetDeltaSyncDto,) async { + final response = await getDeltaSyncWithHttpInfo(assetDeltaSyncDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetDeltaSyncResponseDto',) as AssetDeltaSyncResponseDto; + + } + return null; + } + + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [AssetFullSyncDto] assetFullSyncDto (required): + Future getFullSyncForUserWithHttpInfo(AssetFullSyncDto assetFullSyncDto,) async { + // ignore: prefer_const_declarations + final apiPath = r'/sync/full-sync'; + + // ignore: prefer_final_locals + Object? postBody = assetFullSyncDto; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + apiPath, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// + /// Parameters: + /// + /// * [AssetFullSyncDto] assetFullSyncDto (required): + Future?> getFullSyncForUser(AssetFullSyncDto assetFullSyncDto,) async { + final response = await getFullSyncForUserWithHttpInfo(assetFullSyncDto,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(growable: false); + + } + return null; + } + + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Note: This method returns the HTTP [Response]. /// @@ -105,7 +286,9 @@ class DeprecatedApi { ); } - /// This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + /// Get random assets + /// + /// This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user. /// /// Parameters: /// @@ -128,9 +311,9 @@ class DeprecatedApi { return null; } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Note: This method returns the HTTP [Response]. /// @@ -222,9 +405,9 @@ class DeprecatedApi { ); } - /// Replace the asset with new file, without changing its id + /// Replace asset /// - /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission. + /// This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/download_api.dart b/mobile/openapi/lib/api/download_api.dart index 62c97bfc9c..5245622753 100644 --- a/mobile/openapi/lib/api/download_api.dart +++ b/mobile/openapi/lib/api/download_api.dart @@ -16,7 +16,9 @@ class DownloadApi { final ApiClient apiClient; - /// This endpoint requires the `asset.download` permission. + /// Download asset archive + /// + /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. /// /// Note: This method returns the HTTP [Response]. /// @@ -59,7 +61,9 @@ class DownloadApi { ); } - /// This endpoint requires the `asset.download` permission. + /// Download asset archive + /// + /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. /// /// Parameters: /// @@ -83,7 +87,9 @@ class DownloadApi { return null; } - /// This endpoint requires the `asset.download` permission. + /// Retrieve download information + /// + /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. /// /// Note: This method returns the HTTP [Response]. /// @@ -126,7 +132,9 @@ class DownloadApi { ); } - /// This endpoint requires the `asset.download` permission. + /// Retrieve download information + /// + /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/duplicates_api.dart b/mobile/openapi/lib/api/duplicates_api.dart index 9df6e46586..7fa7b368b5 100644 --- a/mobile/openapi/lib/api/duplicates_api.dart +++ b/mobile/openapi/lib/api/duplicates_api.dart @@ -16,7 +16,9 @@ class DuplicatesApi { final ApiClient apiClient; - /// This endpoint requires the `duplicate.delete` permission. + /// Delete a duplicate + /// + /// Delete a single duplicate asset specified by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -49,7 +51,9 @@ class DuplicatesApi { ); } - /// This endpoint requires the `duplicate.delete` permission. + /// Delete a duplicate + /// + /// Delete a single duplicate asset specified by its ID. /// /// Parameters: /// @@ -61,7 +65,9 @@ class DuplicatesApi { } } - /// This endpoint requires the `duplicate.delete` permission. + /// Delete duplicates + /// + /// Delete multiple duplicate assets specified by their IDs. /// /// Note: This method returns the HTTP [Response]. /// @@ -93,7 +99,9 @@ class DuplicatesApi { ); } - /// This endpoint requires the `duplicate.delete` permission. + /// Delete duplicates + /// + /// Delete multiple duplicate assets specified by their IDs. /// /// Parameters: /// @@ -105,7 +113,9 @@ class DuplicatesApi { } } - /// This endpoint requires the `duplicate.read` permission. + /// Retrieve duplicates + /// + /// Retrieve a list of duplicate assets available to the authenticated user. /// /// Note: This method returns the HTTP [Response]. Future getAssetDuplicatesWithHttpInfo() async { @@ -133,7 +143,9 @@ class DuplicatesApi { ); } - /// This endpoint requires the `duplicate.read` permission. + /// Retrieve duplicates + /// + /// Retrieve a list of duplicate assets available to the authenticated user. Future?> getAssetDuplicates() async { final response = await getAssetDuplicatesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dart index 2f8e6be60d..1d2e7401e8 100644 --- a/mobile/openapi/lib/api/faces_api.dart +++ b/mobile/openapi/lib/api/faces_api.dart @@ -16,7 +16,9 @@ class FacesApi { final ApiClient apiClient; - /// This endpoint requires the `face.create` permission. + /// Create a face + /// + /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.create` permission. + /// Create a face + /// + /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. /// /// Parameters: /// @@ -60,7 +64,9 @@ class FacesApi { } } - /// This endpoint requires the `face.delete` permission. + /// Delete a face + /// + /// Delete a face identified by the id. Optionally can be force deleted. /// /// Note: This method returns the HTTP [Response]. /// @@ -95,7 +101,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.delete` permission. + /// Delete a face + /// + /// Delete a face identified by the id. Optionally can be force deleted. /// /// Parameters: /// @@ -109,7 +117,9 @@ class FacesApi { } } - /// This endpoint requires the `face.read` permission. + /// Retrieve faces for asset + /// + /// Retrieve all faces belonging to an asset. /// /// Note: This method returns the HTTP [Response]. /// @@ -143,7 +153,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.read` permission. + /// Retrieve faces for asset + /// + /// Retrieve all faces belonging to an asset. /// /// Parameters: /// @@ -166,7 +178,9 @@ class FacesApi { return null; } - /// This endpoint requires the `face.update` permission. + /// Re-assign a face to another person + /// + /// Re-assign the face provided in the body to the person identified by the id in the path parameter. /// /// Note: This method returns the HTTP [Response]. /// @@ -201,7 +215,9 @@ class FacesApi { ); } - /// This endpoint requires the `face.update` permission. + /// Re-assign a face to another person + /// + /// Re-assign the face provided in the body to the person identified by the id in the path parameter. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/jobs_api.dart b/mobile/openapi/lib/api/jobs_api.dart index 4c935828a0..e783f93c7c 100644 --- a/mobile/openapi/lib/api/jobs_api.dart +++ b/mobile/openapi/lib/api/jobs_api.dart @@ -16,7 +16,9 @@ class JobsApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Create a manual job + /// + /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class JobsApi { ); } - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Create a manual job + /// + /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. /// /// Parameters: /// @@ -60,7 +64,9 @@ class JobsApi { } } - /// This endpoint is an admin-only route, and requires the `job.read` permission. + /// Retrieve queue counts and status + /// + /// Retrieve the counts of the current queue, as well as the current status. /// /// Note: This method returns the HTTP [Response]. Future getAllJobsStatusWithHttpInfo() async { @@ -88,7 +94,9 @@ class JobsApi { ); } - /// This endpoint is an admin-only route, and requires the `job.read` permission. + /// Retrieve queue counts and status + /// + /// Retrieve the counts of the current queue, as well as the current status. Future getAllJobsStatus() async { final response = await getAllJobsStatusWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class JobsApi { return null; } - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Run jobs + /// + /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -139,7 +149,9 @@ class JobsApi { ); } - /// This endpoint is an admin-only route, and requires the `job.create` permission. + /// Run jobs + /// + /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/libraries_api.dart b/mobile/openapi/lib/api/libraries_api.dart index 9258f8e3eb..ca59f823fe 100644 --- a/mobile/openapi/lib/api/libraries_api.dart +++ b/mobile/openapi/lib/api/libraries_api.dart @@ -16,7 +16,9 @@ class LibrariesApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `library.create` permission. + /// Create a library + /// + /// Create a new external library. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.create` permission. + /// Create a library + /// + /// Create a new external library. /// /// Parameters: /// @@ -68,7 +72,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.delete` permission. + /// Delete a library + /// + /// Delete an external library by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.delete` permission. + /// Delete a library + /// + /// Delete an external library by its ID. /// /// Parameters: /// @@ -113,7 +121,9 @@ class LibrariesApi { } } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve libraries + /// + /// Retrieve a list of external libraries. /// /// Note: This method returns the HTTP [Response]. Future getAllLibrariesWithHttpInfo() async { @@ -141,7 +151,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve libraries + /// + /// Retrieve a list of external libraries. Future?> getAllLibraries() async { final response = await getAllLibrariesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -160,7 +172,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve a library + /// + /// Retrieve an external library by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -193,7 +207,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.read` permission. + /// Retrieve a library + /// + /// Retrieve an external library by its ID. /// /// Parameters: /// @@ -213,7 +229,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.statistics` permission. + /// Retrieve library statistics + /// + /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. /// /// Note: This method returns the HTTP [Response]. /// @@ -246,7 +264,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.statistics` permission. + /// Retrieve library statistics + /// + /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. /// /// Parameters: /// @@ -266,7 +286,9 @@ class LibrariesApi { return null; } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Scan a library + /// + /// Queue a scan for the external library to find and import new assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -299,7 +321,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Scan a library + /// + /// Queue a scan for the external library to find and import new assets. /// /// Parameters: /// @@ -311,7 +335,9 @@ class LibrariesApi { } } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Update a library + /// + /// Update an existing external library. /// /// Note: This method returns the HTTP [Response]. /// @@ -346,7 +372,9 @@ class LibrariesApi { ); } - /// This endpoint is an admin-only route, and requires the `library.update` permission. + /// Update a library + /// + /// Update an existing external library. /// /// Parameters: /// @@ -368,7 +396,12 @@ class LibrariesApi { return null; } - /// Performs an HTTP 'POST /libraries/{id}/validate' operation and returns the [Response]. + /// Validate library settings + /// + /// Validate the settings of an external library. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): @@ -400,6 +433,10 @@ class LibrariesApi { ); } + /// Validate library settings + /// + /// Validate the settings of an external library. + /// /// Parameters: /// /// * [String] id (required): diff --git a/mobile/openapi/lib/api/maintenance_admin_api.dart b/mobile/openapi/lib/api/maintenance_admin_api.dart index 7304dcc3d0..6e2f102c74 100644 --- a/mobile/openapi/lib/api/maintenance_admin_api.dart +++ b/mobile/openapi/lib/api/maintenance_admin_api.dart @@ -16,9 +16,7 @@ class MaintenanceAdminApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `maintenance` permission. - /// - /// Note: This method returns the HTTP [Response]. + /// Performs an HTTP 'POST /admin/maintenance/end' operation and returns the [Response]. Future endMaintenanceWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/admin/maintenance/end'; @@ -44,7 +42,6 @@ class MaintenanceAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `maintenance` permission. Future endMaintenance() async { final response = await endMaintenanceWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -99,9 +96,7 @@ class MaintenanceAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `maintenance` permission. - /// - /// Note: This method returns the HTTP [Response]. + /// Performs an HTTP 'POST /admin/maintenance/start' operation and returns the [Response]. Future startMaintenanceWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/admin/maintenance/start'; @@ -127,7 +122,6 @@ class MaintenanceAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `maintenance` permission. Future startMaintenance() async { final response = await startMaintenanceWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/map_api.dart b/mobile/openapi/lib/api/map_api.dart index da4f3dffcc..6302ac304e 100644 --- a/mobile/openapi/lib/api/map_api.dart +++ b/mobile/openapi/lib/api/map_api.dart @@ -16,21 +16,26 @@ class MapApi { final ApiClient apiClient; - /// Performs an HTTP 'GET /map/markers' operation and returns the [Response]. + /// Retrieve map markers + /// + /// Retrieve a list of latitude and longitude coordinates for every asset with location data. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// - /// * [bool] isArchived: - /// - /// * [bool] isFavorite: - /// /// * [DateTime] fileCreatedAfter: /// /// * [DateTime] fileCreatedBefore: /// + /// * [bool] isArchived: + /// + /// * [bool] isFavorite: + /// /// * [bool] withPartners: /// /// * [bool] withSharedAlbums: - Future getMapMarkersWithHttpInfo({ bool? isArchived, bool? isFavorite, DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? withPartners, bool? withSharedAlbums, }) async { + Future getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async { // ignore: prefer_const_declarations final apiPath = r'/map/markers'; @@ -41,18 +46,18 @@ class MapApi { final headerParams = {}; final formParams = {}; - if (isArchived != null) { - queryParams.addAll(_queryParams('', 'isArchived', isArchived)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } if (fileCreatedAfter != null) { queryParams.addAll(_queryParams('', 'fileCreatedAfter', fileCreatedAfter)); } if (fileCreatedBefore != null) { queryParams.addAll(_queryParams('', 'fileCreatedBefore', fileCreatedBefore)); } + if (isArchived != null) { + queryParams.addAll(_queryParams('', 'isArchived', isArchived)); + } + if (isFavorite != null) { + queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); + } if (withPartners != null) { queryParams.addAll(_queryParams('', 'withPartners', withPartners)); } @@ -74,21 +79,25 @@ class MapApi { ); } + /// Retrieve map markers + /// + /// Retrieve a list of latitude and longitude coordinates for every asset with location data. + /// /// Parameters: /// - /// * [bool] isArchived: - /// - /// * [bool] isFavorite: - /// /// * [DateTime] fileCreatedAfter: /// /// * [DateTime] fileCreatedBefore: /// + /// * [bool] isArchived: + /// + /// * [bool] isFavorite: + /// /// * [bool] withPartners: /// /// * [bool] withSharedAlbums: - Future?> getMapMarkers({ bool? isArchived, bool? isFavorite, DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? withPartners, bool? withSharedAlbums, }) async { - final response = await getMapMarkersWithHttpInfo( isArchived: isArchived, isFavorite: isFavorite, fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, withPartners: withPartners, withSharedAlbums: withSharedAlbums, ); + Future?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, }) async { + final response = await getMapMarkersWithHttpInfo( fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -105,7 +114,12 @@ class MapApi { return null; } - /// Performs an HTTP 'GET /map/reverse-geocode' operation and returns the [Response]. + /// Reverse geocode coordinates + /// + /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [double] lat (required): @@ -139,6 +153,10 @@ class MapApi { ); } + /// Reverse geocode coordinates + /// + /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. + /// /// Parameters: /// /// * [double] lat (required): diff --git a/mobile/openapi/lib/api/memories_api.dart b/mobile/openapi/lib/api/memories_api.dart index f9280101e6..314595e84e 100644 --- a/mobile/openapi/lib/api/memories_api.dart +++ b/mobile/openapi/lib/api/memories_api.dart @@ -16,7 +16,9 @@ class MemoriesApi { final ApiClient apiClient; - /// This endpoint requires the `memoryAsset.create` permission. + /// Add assets to a memory + /// + /// Add a list of asset IDs to a specific memory. /// /// Note: This method returns the HTTP [Response]. /// @@ -51,7 +53,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memoryAsset.create` permission. + /// Add assets to a memory + /// + /// Add a list of asset IDs to a specific memory. /// /// Parameters: /// @@ -76,7 +80,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.create` permission. + /// Create a memory + /// + /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. /// /// Note: This method returns the HTTP [Response]. /// @@ -108,7 +114,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.create` permission. + /// Create a memory + /// + /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. /// /// Parameters: /// @@ -128,7 +136,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.delete` permission. + /// Delete a memory + /// + /// Delete a specific memory by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -161,7 +171,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.delete` permission. + /// Delete a memory + /// + /// Delete a specific memory by its ID. /// /// Parameters: /// @@ -173,7 +185,9 @@ class MemoriesApi { } } - /// This endpoint requires the `memory.read` permission. + /// Retrieve a memory + /// + /// Retrieve a specific memory by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -206,7 +220,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.read` permission. + /// Retrieve a memory + /// + /// Retrieve a specific memory by its ID. /// /// Parameters: /// @@ -226,7 +242,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.statistics` permission. + /// Retrieve memories statistics + /// + /// Retrieve statistics about memories, such as total count and other relevant metrics. /// /// Note: This method returns the HTTP [Response]. /// @@ -238,8 +256,13 @@ class MemoriesApi { /// /// * [bool] isTrashed: /// + /// * [MemorySearchOrder] order: + /// + /// * [int] size: + /// Number of memories to return + /// /// * [MemoryType] type: - Future memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async { + Future memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async { // ignore: prefer_const_declarations final apiPath = r'/memories/statistics'; @@ -259,6 +282,12 @@ class MemoriesApi { if (isTrashed != null) { queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); } + if (order != null) { + queryParams.addAll(_queryParams('', 'order', order)); + } + if (size != null) { + queryParams.addAll(_queryParams('', 'size', size)); + } if (type != null) { queryParams.addAll(_queryParams('', 'type', type)); } @@ -277,7 +306,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.statistics` permission. + /// Retrieve memories statistics + /// + /// Retrieve statistics about memories, such as total count and other relevant metrics. /// /// Parameters: /// @@ -287,9 +318,14 @@ class MemoriesApi { /// /// * [bool] isTrashed: /// + /// * [MemorySearchOrder] order: + /// + /// * [int] size: + /// Number of memories to return + /// /// * [MemoryType] type: - Future memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async { - final response = await memoriesStatisticsWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, type: type, ); + Future memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async { + final response = await memoriesStatisticsWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -303,7 +339,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memoryAsset.delete` permission. + /// Remove assets from a memory + /// + /// Remove a list of asset IDs from a specific memory. /// /// Note: This method returns the HTTP [Response]. /// @@ -338,7 +376,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memoryAsset.delete` permission. + /// Remove assets from a memory + /// + /// Remove a list of asset IDs from a specific memory. /// /// Parameters: /// @@ -363,7 +403,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.read` permission. + /// Retrieve memories + /// + /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. /// /// Note: This method returns the HTTP [Response]. /// @@ -375,8 +417,13 @@ class MemoriesApi { /// /// * [bool] isTrashed: /// + /// * [MemorySearchOrder] order: + /// + /// * [int] size: + /// Number of memories to return + /// /// * [MemoryType] type: - Future searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async { + Future searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async { // ignore: prefer_const_declarations final apiPath = r'/memories'; @@ -396,6 +443,12 @@ class MemoriesApi { if (isTrashed != null) { queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); } + if (order != null) { + queryParams.addAll(_queryParams('', 'order', order)); + } + if (size != null) { + queryParams.addAll(_queryParams('', 'size', size)); + } if (type != null) { queryParams.addAll(_queryParams('', 'type', type)); } @@ -414,7 +467,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.read` permission. + /// Retrieve memories + /// + /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. /// /// Parameters: /// @@ -424,9 +479,14 @@ class MemoriesApi { /// /// * [bool] isTrashed: /// + /// * [MemorySearchOrder] order: + /// + /// * [int] size: + /// Number of memories to return + /// /// * [MemoryType] type: - Future?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemoryType? type, }) async { - final response = await searchMemoriesWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, type: type, ); + Future?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, }) async { + final response = await searchMemoriesWithHttpInfo( for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -443,7 +503,9 @@ class MemoriesApi { return null; } - /// This endpoint requires the `memory.update` permission. + /// Update a memory + /// + /// Update an existing memory by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -478,7 +540,9 @@ class MemoriesApi { ); } - /// This endpoint requires the `memory.update` permission. + /// Update a memory + /// + /// Update an existing memory by its ID. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/notifications_admin_api.dart b/mobile/openapi/lib/api/notifications_admin_api.dart index 409683a950..7821553d30 100644 --- a/mobile/openapi/lib/api/notifications_admin_api.dart +++ b/mobile/openapi/lib/api/notifications_admin_api.dart @@ -16,7 +16,12 @@ class NotificationsAdminApi { final ApiClient apiClient; - /// Performs an HTTP 'POST /admin/notifications' operation and returns the [Response]. + /// Create a notification + /// + /// Create a new notification for a specific user. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [NotificationCreateDto] notificationCreateDto (required): @@ -45,6 +50,10 @@ class NotificationsAdminApi { ); } + /// Create a notification + /// + /// Create a new notification for a specific user. + /// /// Parameters: /// /// * [NotificationCreateDto] notificationCreateDto (required): @@ -63,7 +72,12 @@ class NotificationsAdminApi { return null; } - /// Performs an HTTP 'POST /admin/notifications/templates/{name}' operation and returns the [Response]. + /// Render email template + /// + /// Retrieve a preview of the provided email template. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] name (required): @@ -95,6 +109,10 @@ class NotificationsAdminApi { ); } + /// Render email template + /// + /// Retrieve a preview of the provided email template. + /// /// Parameters: /// /// * [String] name (required): @@ -115,7 +133,12 @@ class NotificationsAdminApi { return null; } - /// Performs an HTTP 'POST /admin/notifications/test-email' operation and returns the [Response]. + /// Send test email + /// + /// Send a test email using the provided SMTP configuration. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): @@ -144,6 +167,10 @@ class NotificationsAdminApi { ); } + /// Send test email + /// + /// Send a test email using the provided SMTP configuration. + /// /// Parameters: /// /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): diff --git a/mobile/openapi/lib/api/notifications_api.dart b/mobile/openapi/lib/api/notifications_api.dart index 1d276efaaf..2de59a0a76 100644 --- a/mobile/openapi/lib/api/notifications_api.dart +++ b/mobile/openapi/lib/api/notifications_api.dart @@ -16,7 +16,9 @@ class NotificationsApi { final ApiClient apiClient; - /// This endpoint requires the `notification.delete` permission. + /// Delete a notification + /// + /// Delete a specific notification. /// /// Note: This method returns the HTTP [Response]. /// @@ -49,7 +51,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.delete` permission. + /// Delete a notification + /// + /// Delete a specific notification. /// /// Parameters: /// @@ -61,7 +65,9 @@ class NotificationsApi { } } - /// This endpoint requires the `notification.delete` permission. + /// Delete notifications + /// + /// Delete a list of notifications at once. /// /// Note: This method returns the HTTP [Response]. /// @@ -93,7 +99,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.delete` permission. + /// Delete notifications + /// + /// Delete a list of notifications at once. /// /// Parameters: /// @@ -105,7 +113,9 @@ class NotificationsApi { } } - /// This endpoint requires the `notification.read` permission. + /// Get a notification + /// + /// Retrieve a specific notification identified by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -138,7 +148,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.read` permission. + /// Get a notification + /// + /// Retrieve a specific notification identified by id. /// /// Parameters: /// @@ -158,7 +170,9 @@ class NotificationsApi { return null; } - /// This endpoint requires the `notification.read` permission. + /// Retrieve notifications + /// + /// Retrieve a list of notifications. /// /// Note: This method returns the HTTP [Response]. /// @@ -209,7 +223,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.read` permission. + /// Retrieve notifications + /// + /// Retrieve a list of notifications. /// /// Parameters: /// @@ -238,7 +254,9 @@ class NotificationsApi { return null; } - /// This endpoint requires the `notification.update` permission. + /// Update a notification + /// + /// Update a specific notification to set its read status. /// /// Note: This method returns the HTTP [Response]. /// @@ -273,7 +291,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.update` permission. + /// Update a notification + /// + /// Update a specific notification to set its read status. /// /// Parameters: /// @@ -295,7 +315,9 @@ class NotificationsApi { return null; } - /// This endpoint requires the `notification.update` permission. + /// Update notifications + /// + /// Update a list of notifications. Allows to bulk-set the read status of notifications. /// /// Note: This method returns the HTTP [Response]. /// @@ -327,7 +349,9 @@ class NotificationsApi { ); } - /// This endpoint requires the `notification.update` permission. + /// Update notifications + /// + /// Update a list of notifications. Allows to bulk-set the read status of notifications. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/o_auth_api.dart b/mobile/openapi/lib/api/o_auth_api.dart deleted file mode 100644 index 9f16e37c70..0000000000 --- a/mobile/openapi/lib/api/o_auth_api.dart +++ /dev/null @@ -1,233 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class OAuthApi { - OAuthApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Performs an HTTP 'POST /oauth/callback' operation and returns the [Response]. - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/callback'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuth(OAuthCallbackDto oAuthCallbackDto,) async { - final response = await finishOAuthWithHttpInfo(oAuthCallbackDto,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; - - } - return null; - } - - /// Performs an HTTP 'POST /oauth/link' operation and returns the [Response]. - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto,) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/link'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto,) async { - final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Performs an HTTP 'GET /oauth/mobile-redirect' operation and returns the [Response]. - Future redirectOAuthToMobileWithHttpInfo() async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/mobile-redirect'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - Future redirectOAuthToMobile() async { - final response = await redirectOAuthToMobileWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Performs an HTTP 'POST /oauth/authorize' operation and returns the [Response]. - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto,) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/authorize'; - - // ignore: prefer_final_locals - Object? postBody = oAuthConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuth(OAuthConfigDto oAuthConfigDto,) async { - final response = await startOAuthWithHttpInfo(oAuthConfigDto,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto; - - } - return null; - } - - /// Performs an HTTP 'POST /oauth/unlink' operation and returns the [Response]. - Future unlinkOAuthAccountWithHttpInfo() async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/unlink'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - ); - } - - Future unlinkOAuthAccount() async { - final response = await unlinkOAuthAccountWithHttpInfo(); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/partners_api.dart b/mobile/openapi/lib/api/partners_api.dart index a5fdf53ab5..9cbd4bfedb 100644 --- a/mobile/openapi/lib/api/partners_api.dart +++ b/mobile/openapi/lib/api/partners_api.dart @@ -16,7 +16,9 @@ class PartnersApi { final ApiClient apiClient; - /// This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// Create a new partner to share assets with. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// Create a new partner to share assets with. /// /// Parameters: /// @@ -68,7 +72,9 @@ class PartnersApi { return null; } - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class PartnersApi { ); } - /// This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + /// Create a partner + /// + /// This property was deprecated in v1.141.0. Create a new partner to share assets with. /// /// Parameters: /// @@ -121,7 +129,9 @@ class PartnersApi { return null; } - /// This endpoint requires the `partner.read` permission. + /// Retrieve partners + /// + /// Retrieve a list of partners with whom assets are shared. /// /// Note: This method returns the HTTP [Response]. /// @@ -155,7 +165,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.read` permission. + /// Retrieve partners + /// + /// Retrieve a list of partners with whom assets are shared. /// /// Parameters: /// @@ -178,7 +190,9 @@ class PartnersApi { return null; } - /// This endpoint requires the `partner.delete` permission. + /// Remove a partner + /// + /// Stop sharing assets with a partner. /// /// Note: This method returns the HTTP [Response]. /// @@ -211,7 +225,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.delete` permission. + /// Remove a partner + /// + /// Stop sharing assets with a partner. /// /// Parameters: /// @@ -223,7 +239,9 @@ class PartnersApi { } } - /// This endpoint requires the `partner.update` permission. + /// Update a partner + /// + /// Specify whether a partner's assets should appear in the user's timeline. /// /// Note: This method returns the HTTP [Response]. /// @@ -258,7 +276,9 @@ class PartnersApi { ); } - /// This endpoint requires the `partner.update` permission. + /// Update a partner + /// + /// Specify whether a partner's assets should appear in the user's timeline. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/people_api.dart b/mobile/openapi/lib/api/people_api.dart index 68c16785cc..c38e61584e 100644 --- a/mobile/openapi/lib/api/people_api.dart +++ b/mobile/openapi/lib/api/people_api.dart @@ -16,7 +16,9 @@ class PeopleApi { final ApiClient apiClient; - /// This endpoint requires the `person.create` permission. + /// Create a person + /// + /// Create a new person that can have multiple faces assigned to them. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.create` permission. + /// Create a person + /// + /// Create a new person that can have multiple faces assigned to them. /// /// Parameters: /// @@ -68,7 +72,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.delete` permission. + /// Delete people + /// + /// Bulk delete a list of people at once. /// /// Note: This method returns the HTTP [Response]. /// @@ -100,7 +106,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.delete` permission. + /// Delete people + /// + /// Bulk delete a list of people at once. /// /// Parameters: /// @@ -112,7 +120,9 @@ class PeopleApi { } } - /// This endpoint requires the `person.delete` permission. + /// Delete person + /// + /// Delete an individual person. /// /// Note: This method returns the HTTP [Response]. /// @@ -145,7 +155,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.delete` permission. + /// Delete person + /// + /// Delete an individual person. /// /// Parameters: /// @@ -157,7 +169,9 @@ class PeopleApi { } } - /// This endpoint requires the `person.read` permission. + /// Get all people + /// + /// Retrieve a list of all people. /// /// Note: This method returns the HTTP [Response]. /// @@ -215,7 +229,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.read` permission. + /// Get all people + /// + /// Retrieve a list of all people. /// /// Parameters: /// @@ -245,7 +261,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.read` permission. + /// Get a person + /// + /// Retrieve a person by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -278,7 +296,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.read` permission. + /// Get a person + /// + /// Retrieve a person by id. /// /// Parameters: /// @@ -298,7 +318,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.statistics` permission. + /// Get person statistics + /// + /// Retrieve statistics about a specific person. /// /// Note: This method returns the HTTP [Response]. /// @@ -331,7 +353,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.statistics` permission. + /// Get person statistics + /// + /// Retrieve statistics about a specific person. /// /// Parameters: /// @@ -351,7 +375,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.read` permission. + /// Get person thumbnail + /// + /// Retrieve the thumbnail file for a person. /// /// Note: This method returns the HTTP [Response]. /// @@ -384,7 +410,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.read` permission. + /// Get person thumbnail + /// + /// Retrieve the thumbnail file for a person. /// /// Parameters: /// @@ -404,7 +432,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.merge` permission. + /// Merge people + /// + /// Merge a list of people into the person specified in the path parameter. /// /// Note: This method returns the HTTP [Response]. /// @@ -439,7 +469,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.merge` permission. + /// Merge people + /// + /// Merge a list of people into the person specified in the path parameter. /// /// Parameters: /// @@ -464,7 +496,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.reassign` permission. + /// Reassign faces + /// + /// Bulk reassign a list of faces to a different person. /// /// Note: This method returns the HTTP [Response]. /// @@ -499,7 +533,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.reassign` permission. + /// Reassign faces + /// + /// Bulk reassign a list of faces to a different person. /// /// Parameters: /// @@ -524,7 +560,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.update` permission. + /// Update people + /// + /// Bulk update multiple people at once. /// /// Note: This method returns the HTTP [Response]. /// @@ -556,7 +594,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.update` permission. + /// Update people + /// + /// Bulk update multiple people at once. /// /// Parameters: /// @@ -579,7 +619,9 @@ class PeopleApi { return null; } - /// This endpoint requires the `person.update` permission. + /// Update person + /// + /// Update an individual person. /// /// Note: This method returns the HTTP [Response]. /// @@ -614,7 +656,9 @@ class PeopleApi { ); } - /// This endpoint requires the `person.update` permission. + /// Update person + /// + /// Update an individual person. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart index 6c279a3503..375e9a1e87 100644 --- a/mobile/openapi/lib/api/search_api.dart +++ b/mobile/openapi/lib/api/search_api.dart @@ -16,7 +16,9 @@ class SearchApi { final ApiClient apiClient; - /// This endpoint requires the `asset.read` permission. + /// Retrieve assets by city + /// + /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. /// /// Note: This method returns the HTTP [Response]. Future getAssetsByCityWithHttpInfo() async { @@ -44,7 +46,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve assets by city + /// + /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. Future?> getAssetsByCity() async { final response = await getAssetsByCityWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -63,7 +67,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve explore data + /// + /// Retrieve data for the explore section, such as popular people and places. /// /// Note: This method returns the HTTP [Response]. Future getExploreDataWithHttpInfo() async { @@ -91,7 +97,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve explore data + /// + /// Retrieve data for the explore section, such as popular people and places. Future?> getExploreData() async { final response = await getExploreDataWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -110,7 +118,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Retrieve search suggestions + /// + /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. /// /// Note: This method returns the HTTP [Response]. /// @@ -175,7 +185,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Retrieve search suggestions + /// + /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. /// /// Parameters: /// @@ -211,7 +223,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.statistics` permission. + /// Search asset statistics + /// + /// Retrieve statistical data about assets based on search criteria, such as the total matching count. /// /// Note: This method returns the HTTP [Response]. /// @@ -243,7 +257,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.statistics` permission. + /// Search asset statistics + /// + /// Retrieve statistical data about assets based on search criteria, such as the total matching count. /// /// Parameters: /// @@ -263,7 +279,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search assets by metadata + /// + /// Search for assets based on various metadata criteria. /// /// Note: This method returns the HTTP [Response]. /// @@ -295,7 +313,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search assets by metadata + /// + /// Search for assets based on various metadata criteria. /// /// Parameters: /// @@ -315,7 +335,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search large assets + /// + /// Search for assets that are considered large based on specified criteria. /// /// Note: This method returns the HTTP [Response]. /// @@ -506,7 +528,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search large assets + /// + /// Search for assets that are considered large based on specified criteria. /// /// Parameters: /// @@ -591,7 +615,9 @@ class SearchApi { return null; } - /// This endpoint requires the `person.read` permission. + /// Search people + /// + /// Search for people by name. /// /// Note: This method returns the HTTP [Response]. /// @@ -630,7 +656,9 @@ class SearchApi { ); } - /// This endpoint requires the `person.read` permission. + /// Search people + /// + /// Search for people by name. /// /// Parameters: /// @@ -655,7 +683,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search places + /// + /// Search for places by name. /// /// Note: This method returns the HTTP [Response]. /// @@ -689,7 +719,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search places + /// + /// Search for places by name. /// /// Parameters: /// @@ -712,7 +744,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Search random assets + /// + /// Retrieve a random selection of assets based on the provided criteria. /// /// Note: This method returns the HTTP [Response]. /// @@ -744,7 +778,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Search random assets + /// + /// Retrieve a random selection of assets based on the provided criteria. /// /// Parameters: /// @@ -767,7 +803,9 @@ class SearchApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Smart asset search + /// + /// Perform a smart search for assets by using machine learning vectors to determine relevance. /// /// Note: This method returns the HTTP [Response]. /// @@ -799,7 +837,9 @@ class SearchApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Smart asset search + /// + /// Perform a smart search for assets by using machine learning vectors to determine relevance. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart index 9fa8f2016d..f5b70a9ea4 100644 --- a/mobile/openapi/lib/api/server_api.dart +++ b/mobile/openapi/lib/api/server_api.dart @@ -16,7 +16,9 @@ class ServerApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + /// Delete server product key + /// + /// Delete the currently set server product key. /// /// Note: This method returns the HTTP [Response]. Future deleteServerLicenseWithHttpInfo() async { @@ -44,7 +46,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + /// Delete server product key + /// + /// Delete the currently set server product key. Future deleteServerLicense() async { final response = await deleteServerLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -52,7 +56,9 @@ class ServerApi { } } - /// This endpoint requires the `server.about` permission. + /// Get server information + /// + /// Retrieve a list of information about the server. /// /// Note: This method returns the HTTP [Response]. Future getAboutInfoWithHttpInfo() async { @@ -80,7 +86,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.about` permission. + /// Get server information + /// + /// Retrieve a list of information about the server. Future getAboutInfo() async { final response = await getAboutInfoWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -96,7 +104,9 @@ class ServerApi { return null; } - /// This endpoint requires the `server.apkLinks` permission. + /// Get APK links + /// + /// Retrieve links to the APKs for the current server version. /// /// Note: This method returns the HTTP [Response]. Future getApkLinksWithHttpInfo() async { @@ -124,7 +134,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.apkLinks` permission. + /// Get APK links + /// + /// Retrieve links to the APKs for the current server version. Future getApkLinks() async { final response = await getApkLinksWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -140,7 +152,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/config' operation and returns the [Response]. + /// Get config + /// + /// Retrieve the current server configuration. + /// + /// Note: This method returns the HTTP [Response]. Future getServerConfigWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/config'; @@ -166,6 +182,9 @@ class ServerApi { ); } + /// Get config + /// + /// Retrieve the current server configuration. Future getServerConfig() async { final response = await getServerConfigWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -181,7 +200,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/features' operation and returns the [Response]. + /// Get features + /// + /// Retrieve available features supported by this server. + /// + /// Note: This method returns the HTTP [Response]. Future getServerFeaturesWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/features'; @@ -207,6 +230,9 @@ class ServerApi { ); } + /// Get features + /// + /// Retrieve available features supported by this server. Future getServerFeatures() async { final response = await getServerFeaturesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -222,7 +248,9 @@ class ServerApi { return null; } - /// This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + /// Get product key + /// + /// Retrieve information about whether the server currently has a product key registered. /// /// Note: This method returns the HTTP [Response]. Future getServerLicenseWithHttpInfo() async { @@ -250,7 +278,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + /// Get product key + /// + /// Retrieve information about whether the server currently has a product key registered. Future getServerLicense() async { final response = await getServerLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -266,7 +296,9 @@ class ServerApi { return null; } - /// This endpoint is an admin-only route, and requires the `server.statistics` permission. + /// Get statistics + /// + /// Retrieve statistics about the entire Immich instance such as asset counts. /// /// Note: This method returns the HTTP [Response]. Future getServerStatisticsWithHttpInfo() async { @@ -294,7 +326,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `server.statistics` permission. + /// Get statistics + /// + /// Retrieve statistics about the entire Immich instance such as asset counts. Future getServerStatistics() async { final response = await getServerStatisticsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -310,7 +344,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/version' operation and returns the [Response]. + /// Get server version + /// + /// Retrieve the current server version in semantic versioning (semver) format. + /// + /// Note: This method returns the HTTP [Response]. Future getServerVersionWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/version'; @@ -336,6 +374,9 @@ class ServerApi { ); } + /// Get server version + /// + /// Retrieve the current server version in semantic versioning (semver) format. Future getServerVersion() async { final response = await getServerVersionWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -351,7 +392,9 @@ class ServerApi { return null; } - /// This endpoint requires the `server.storage` permission. + /// Get storage + /// + /// Retrieve the current storage utilization information of the server. /// /// Note: This method returns the HTTP [Response]. Future getStorageWithHttpInfo() async { @@ -379,7 +422,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.storage` permission. + /// Get storage + /// + /// Retrieve the current storage utilization information of the server. Future getStorage() async { final response = await getStorageWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -395,7 +440,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/media-types' operation and returns the [Response]. + /// Get supported media types + /// + /// Retrieve all media types supported by the server. + /// + /// Note: This method returns the HTTP [Response]. Future getSupportedMediaTypesWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/media-types'; @@ -421,6 +470,9 @@ class ServerApi { ); } + /// Get supported media types + /// + /// Retrieve all media types supported by the server. Future getSupportedMediaTypes() async { final response = await getSupportedMediaTypesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -436,7 +488,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/theme' operation and returns the [Response]. + /// Get theme + /// + /// Retrieve the custom CSS, if existent. + /// + /// Note: This method returns the HTTP [Response]. Future getThemeWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/theme'; @@ -462,6 +518,9 @@ class ServerApi { ); } + /// Get theme + /// + /// Retrieve the custom CSS, if existent. Future getTheme() async { final response = await getThemeWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -477,7 +536,9 @@ class ServerApi { return null; } - /// This endpoint requires the `server.versionCheck` permission. + /// Get version check status + /// + /// Retrieve information about the last time the version check ran. /// /// Note: This method returns the HTTP [Response]. Future getVersionCheckWithHttpInfo() async { @@ -505,7 +566,9 @@ class ServerApi { ); } - /// This endpoint requires the `server.versionCheck` permission. + /// Get version check status + /// + /// Retrieve information about the last time the version check ran. Future getVersionCheck() async { final response = await getVersionCheckWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -521,7 +584,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/version-history' operation and returns the [Response]. + /// Get version history + /// + /// Retrieve a list of past versions the server has been on. + /// + /// Note: This method returns the HTTP [Response]. Future getVersionHistoryWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/version-history'; @@ -547,6 +614,9 @@ class ServerApi { ); } + /// Get version history + /// + /// Retrieve a list of past versions the server has been on. Future?> getVersionHistory() async { final response = await getVersionHistoryWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -565,7 +635,11 @@ class ServerApi { return null; } - /// Performs an HTTP 'GET /server/ping' operation and returns the [Response]. + /// Ping + /// + /// Pong + /// + /// Note: This method returns the HTTP [Response]. Future pingServerWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/server/ping'; @@ -591,6 +665,9 @@ class ServerApi { ); } + /// Ping + /// + /// Pong Future pingServer() async { final response = await pingServerWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -606,7 +683,9 @@ class ServerApi { return null; } - /// This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + /// Set server product key + /// + /// Validate and set the server product key if successful. /// /// Note: This method returns the HTTP [Response]. /// @@ -638,7 +717,9 @@ class ServerApi { ); } - /// This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + /// Set server product key + /// + /// Validate and set the server product key if successful. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/sessions_api.dart b/mobile/openapi/lib/api/sessions_api.dart index 63528d17a7..da508059bc 100644 --- a/mobile/openapi/lib/api/sessions_api.dart +++ b/mobile/openapi/lib/api/sessions_api.dart @@ -16,7 +16,9 @@ class SessionsApi { final ApiClient apiClient; - /// This endpoint requires the `session.create` permission. + /// Create a session + /// + /// Create a session as a child to the current session. This endpoint is used for casting. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.create` permission. + /// Create a session + /// + /// Create a session as a child to the current session. This endpoint is used for casting. /// /// Parameters: /// @@ -68,7 +72,9 @@ class SessionsApi { return null; } - /// This endpoint requires the `session.delete` permission. + /// Delete all sessions + /// + /// Delete all sessions for the user. This will not delete the current session. /// /// Note: This method returns the HTTP [Response]. Future deleteAllSessionsWithHttpInfo() async { @@ -96,7 +102,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.delete` permission. + /// Delete all sessions + /// + /// Delete all sessions for the user. This will not delete the current session. Future deleteAllSessions() async { final response = await deleteAllSessionsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class SessionsApi { } } - /// This endpoint requires the `session.delete` permission. + /// Delete a session + /// + /// Delete a specific session by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -137,7 +147,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.delete` permission. + /// Delete a session + /// + /// Delete a specific session by id. /// /// Parameters: /// @@ -149,7 +161,9 @@ class SessionsApi { } } - /// This endpoint requires the `session.read` permission. + /// Retrieve sessions + /// + /// Retrieve a list of sessions for the user. /// /// Note: This method returns the HTTP [Response]. Future getSessionsWithHttpInfo() async { @@ -177,7 +191,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.read` permission. + /// Retrieve sessions + /// + /// Retrieve a list of sessions for the user. Future?> getSessions() async { final response = await getSessionsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -196,7 +212,9 @@ class SessionsApi { return null; } - /// This endpoint requires the `session.lock` permission. + /// Lock a session + /// + /// Lock a specific session by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -229,7 +247,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.lock` permission. + /// Lock a session + /// + /// Lock a specific session by id. /// /// Parameters: /// @@ -241,7 +261,9 @@ class SessionsApi { } } - /// This endpoint requires the `session.update` permission. + /// Update a session + /// + /// Update a specific session identified by id. /// /// Note: This method returns the HTTP [Response]. /// @@ -276,7 +298,9 @@ class SessionsApi { ); } - /// This endpoint requires the `session.update` permission. + /// Update a session + /// + /// Update a specific session identified by id. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/shared_links_api.dart b/mobile/openapi/lib/api/shared_links_api.dart index e32c566754..79106e5db6 100644 --- a/mobile/openapi/lib/api/shared_links_api.dart +++ b/mobile/openapi/lib/api/shared_links_api.dart @@ -16,7 +16,12 @@ class SharedLinksApi { final ApiClient apiClient; - /// Performs an HTTP 'PUT /shared-links/{id}/assets' operation and returns the [Response]. + /// Add assets to a shared link + /// + /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): @@ -59,6 +64,10 @@ class SharedLinksApi { ); } + /// Add assets to a shared link + /// + /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// /// Parameters: /// /// * [String] id (required): @@ -86,7 +95,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.create` permission. + /// Create a shared link + /// + /// Create a new shared link. /// /// Note: This method returns the HTTP [Response]. /// @@ -118,7 +129,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.create` permission. + /// Create a shared link + /// + /// Create a new shared link. /// /// Parameters: /// @@ -138,7 +151,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve all shared links + /// + /// Retrieve a list of all shared links. /// /// Note: This method returns the HTTP [Response]. /// @@ -174,7 +189,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve all shared links + /// + /// Retrieve a list of all shared links. /// /// Parameters: /// @@ -197,17 +214,22 @@ class SharedLinksApi { return null; } - /// Performs an HTTP 'GET /shared-links/me' operation and returns the [Response]. + /// Retrieve current shared link + /// + /// Retrieve the current shared link associated with authentication method. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// - /// * [String] password: - /// - /// * [String] token: - /// /// * [String] key: /// + /// * [String] password: + /// /// * [String] slug: - Future getMySharedLinkWithHttpInfo({ String? password, String? token, String? key, String? slug, }) async { + /// + /// * [String] token: + Future getMySharedLinkWithHttpInfo({ String? key, String? password, String? slug, String? token, }) async { // ignore: prefer_const_declarations final apiPath = r'/shared-links/me'; @@ -218,18 +240,18 @@ class SharedLinksApi { final headerParams = {}; final formParams = {}; - if (password != null) { - queryParams.addAll(_queryParams('', 'password', password)); - } - if (token != null) { - queryParams.addAll(_queryParams('', 'token', token)); - } if (key != null) { queryParams.addAll(_queryParams('', 'key', key)); } + if (password != null) { + queryParams.addAll(_queryParams('', 'password', password)); + } if (slug != null) { queryParams.addAll(_queryParams('', 'slug', slug)); } + if (token != null) { + queryParams.addAll(_queryParams('', 'token', token)); + } const contentTypes = []; @@ -245,17 +267,21 @@ class SharedLinksApi { ); } + /// Retrieve current shared link + /// + /// Retrieve the current shared link associated with authentication method. + /// /// Parameters: /// - /// * [String] password: - /// - /// * [String] token: - /// /// * [String] key: /// + /// * [String] password: + /// /// * [String] slug: - Future getMySharedLink({ String? password, String? token, String? key, String? slug, }) async { - final response = await getMySharedLinkWithHttpInfo( password: password, token: token, key: key, slug: slug, ); + /// + /// * [String] token: + Future getMySharedLink({ String? key, String? password, String? slug, String? token, }) async { + final response = await getMySharedLinkWithHttpInfo( key: key, password: password, slug: slug, token: token, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -269,7 +295,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve a shared link + /// + /// Retrieve a specific shared link by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -302,7 +330,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.read` permission. + /// Retrieve a shared link + /// + /// Retrieve a specific shared link by its ID. /// /// Parameters: /// @@ -322,7 +352,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.delete` permission. + /// Delete a shared link + /// + /// Delete a specific shared link by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -355,7 +387,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.delete` permission. + /// Delete a shared link + /// + /// Delete a specific shared link by its ID. /// /// Parameters: /// @@ -367,7 +401,12 @@ class SharedLinksApi { } } - /// Performs an HTTP 'DELETE /shared-links/{id}/assets' operation and returns the [Response]. + /// Remove assets from a shared link + /// + /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] id (required): @@ -410,6 +449,10 @@ class SharedLinksApi { ); } + /// Remove assets from a shared link + /// + /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. + /// /// Parameters: /// /// * [String] id (required): @@ -437,7 +480,9 @@ class SharedLinksApi { return null; } - /// This endpoint requires the `sharedLink.update` permission. + /// Update a shared link + /// + /// Update an existing shared link by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -472,7 +517,9 @@ class SharedLinksApi { ); } - /// This endpoint requires the `sharedLink.update` permission. + /// Update a shared link + /// + /// Update an existing shared link by its ID. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/stacks_api.dart b/mobile/openapi/lib/api/stacks_api.dart index 0f76f3396b..66fa1881ac 100644 --- a/mobile/openapi/lib/api/stacks_api.dart +++ b/mobile/openapi/lib/api/stacks_api.dart @@ -16,7 +16,9 @@ class StacksApi { final ApiClient apiClient; - /// This endpoint requires the `stack.create` permission. + /// Create a stack + /// + /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.create` permission. + /// Create a stack + /// + /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. /// /// Parameters: /// @@ -68,7 +72,9 @@ class StacksApi { return null; } - /// This endpoint requires the `stack.delete` permission. + /// Delete a stack + /// + /// Delete a specific stack by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -101,7 +107,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.delete` permission. + /// Delete a stack + /// + /// Delete a specific stack by its ID. /// /// Parameters: /// @@ -113,7 +121,9 @@ class StacksApi { } } - /// This endpoint requires the `stack.delete` permission. + /// Delete stacks + /// + /// Delete multiple stacks by providing a list of stack IDs. /// /// Note: This method returns the HTTP [Response]. /// @@ -145,7 +155,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.delete` permission. + /// Delete stacks + /// + /// Delete multiple stacks by providing a list of stack IDs. /// /// Parameters: /// @@ -157,7 +169,9 @@ class StacksApi { } } - /// This endpoint requires the `stack.read` permission. + /// Retrieve a stack + /// + /// Retrieve a specific stack by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -190,7 +204,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.read` permission. + /// Retrieve a stack + /// + /// Retrieve a specific stack by its ID. /// /// Parameters: /// @@ -210,7 +226,9 @@ class StacksApi { return null; } - /// This endpoint requires the `stack.update` permission. + /// Remove an asset from a stack + /// + /// Remove a specific asset from a stack by providing the stack ID and asset ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -246,7 +264,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.update` permission. + /// Remove an asset from a stack + /// + /// Remove a specific asset from a stack by providing the stack ID and asset ID. /// /// Parameters: /// @@ -260,7 +280,9 @@ class StacksApi { } } - /// This endpoint requires the `stack.read` permission. + /// Retrieve stacks + /// + /// Retrieve a list of stacks. /// /// Note: This method returns the HTTP [Response]. /// @@ -296,7 +318,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.read` permission. + /// Retrieve stacks + /// + /// Retrieve a list of stacks. /// /// Parameters: /// @@ -319,7 +343,9 @@ class StacksApi { return null; } - /// This endpoint requires the `stack.update` permission. + /// Update a stack + /// + /// Update an existing stack by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -354,7 +380,9 @@ class StacksApi { ); } - /// This endpoint requires the `stack.update` permission. + /// Update a stack + /// + /// Update an existing stack by its ID. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/sync_api.dart b/mobile/openapi/lib/api/sync_api.dart index 9e594d6ace..b1a3e61455 100644 --- a/mobile/openapi/lib/api/sync_api.dart +++ b/mobile/openapi/lib/api/sync_api.dart @@ -16,7 +16,9 @@ class SyncApi { final ApiClient apiClient; - /// This endpoint requires the `syncCheckpoint.delete` permission. + /// Delete acknowledgements + /// + /// Delete specific synchronization acknowledgments. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class SyncApi { ); } - /// This endpoint requires the `syncCheckpoint.delete` permission. + /// Delete acknowledgements + /// + /// Delete specific synchronization acknowledgments. /// /// Parameters: /// @@ -60,7 +64,12 @@ class SyncApi { } } - /// Performs an HTTP 'POST /sync/delta-sync' operation and returns the [Response]. + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): @@ -89,6 +98,10 @@ class SyncApi { ); } + /// Get delta sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user. + /// /// Parameters: /// /// * [AssetDeltaSyncDto] assetDeltaSyncDto (required): @@ -107,7 +120,12 @@ class SyncApi { return null; } - /// Performs an HTTP 'POST /sync/full-sync' operation and returns the [Response]. + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [AssetFullSyncDto] assetFullSyncDto (required): @@ -136,6 +154,10 @@ class SyncApi { ); } + /// Get full sync for user + /// + /// This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user. + /// /// Parameters: /// /// * [AssetFullSyncDto] assetFullSyncDto (required): @@ -157,7 +179,9 @@ class SyncApi { return null; } - /// This endpoint requires the `syncCheckpoint.read` permission. + /// Retrieve acknowledgements + /// + /// Retrieve the synchronization acknowledgments for the current session. /// /// Note: This method returns the HTTP [Response]. Future getSyncAckWithHttpInfo() async { @@ -185,7 +209,9 @@ class SyncApi { ); } - /// This endpoint requires the `syncCheckpoint.read` permission. + /// Retrieve acknowledgements + /// + /// Retrieve the synchronization acknowledgments for the current session. Future?> getSyncAck() async { final response = await getSyncAckWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -204,7 +230,9 @@ class SyncApi { return null; } - /// This endpoint requires the `sync.stream` permission. + /// Stream sync changes + /// + /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. /// /// Note: This method returns the HTTP [Response]. /// @@ -236,7 +264,9 @@ class SyncApi { ); } - /// This endpoint requires the `sync.stream` permission. + /// Stream sync changes + /// + /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. /// /// Parameters: /// @@ -248,7 +278,9 @@ class SyncApi { } } - /// This endpoint requires the `syncCheckpoint.update` permission. + /// Acknowledge changes + /// + /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. /// /// Note: This method returns the HTTP [Response]. /// @@ -280,7 +312,9 @@ class SyncApi { ); } - /// This endpoint requires the `syncCheckpoint.update` permission. + /// Acknowledge changes + /// + /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/system_config_api.dart b/mobile/openapi/lib/api/system_config_api.dart index 2ab3879b8a..b04da71273 100644 --- a/mobile/openapi/lib/api/system_config_api.dart +++ b/mobile/openapi/lib/api/system_config_api.dart @@ -16,7 +16,9 @@ class SystemConfigApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration + /// + /// Retrieve the current system configuration. /// /// Note: This method returns the HTTP [Response]. Future getConfigWithHttpInfo() async { @@ -44,7 +46,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration + /// + /// Retrieve the current system configuration. Future getConfig() async { final response = await getConfigWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -60,7 +64,9 @@ class SystemConfigApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration defaults + /// + /// Retrieve the default values for the system configuration. /// /// Note: This method returns the HTTP [Response]. Future getConfigDefaultsWithHttpInfo() async { @@ -88,7 +94,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get system configuration defaults + /// + /// Retrieve the default values for the system configuration. Future getConfigDefaults() async { final response = await getConfigDefaultsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class SystemConfigApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get storage template options + /// + /// Retrieve exemplary storage template options. /// /// Note: This method returns the HTTP [Response]. Future getStorageTemplateOptionsWithHttpInfo() async { @@ -132,7 +142,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + /// Get storage template options + /// + /// Retrieve exemplary storage template options. Future getStorageTemplateOptions() async { final response = await getStorageTemplateOptionsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -148,7 +160,9 @@ class SystemConfigApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + /// Update system configuration + /// + /// Update the system configuration with a new system configuration. /// /// Note: This method returns the HTTP [Response]. /// @@ -180,7 +194,9 @@ class SystemConfigApi { ); } - /// This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + /// Update system configuration + /// + /// Update the system configuration with a new system configuration. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/system_metadata_api.dart b/mobile/openapi/lib/api/system_metadata_api.dart index f6b9bad1d6..63fd7628ec 100644 --- a/mobile/openapi/lib/api/system_metadata_api.dart +++ b/mobile/openapi/lib/api/system_metadata_api.dart @@ -16,7 +16,9 @@ class SystemMetadataApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve admin onboarding + /// + /// Retrieve the current admin onboarding status. /// /// Note: This method returns the HTTP [Response]. Future getAdminOnboardingWithHttpInfo() async { @@ -44,7 +46,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve admin onboarding + /// + /// Retrieve the current admin onboarding status. Future getAdminOnboarding() async { final response = await getAdminOnboardingWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -60,7 +64,9 @@ class SystemMetadataApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve reverse geocoding state + /// + /// Retrieve the current state of the reverse geocoding import. /// /// Note: This method returns the HTTP [Response]. Future getReverseGeocodingStateWithHttpInfo() async { @@ -88,7 +94,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve reverse geocoding state + /// + /// Retrieve the current state of the reverse geocoding import. Future getReverseGeocodingState() async { final response = await getReverseGeocodingStateWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -104,7 +112,9 @@ class SystemMetadataApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve version check state + /// + /// Retrieve the current state of the version check process. /// /// Note: This method returns the HTTP [Response]. Future getVersionCheckStateWithHttpInfo() async { @@ -132,7 +142,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + /// Retrieve version check state + /// + /// Retrieve the current state of the version check process. Future getVersionCheckState() async { final response = await getVersionCheckStateWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -148,7 +160,9 @@ class SystemMetadataApi { return null; } - /// This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + /// Update admin onboarding + /// + /// Update the admin onboarding status. /// /// Note: This method returns the HTTP [Response]. /// @@ -180,7 +194,9 @@ class SystemMetadataApi { ); } - /// This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + /// Update admin onboarding + /// + /// Update the admin onboarding status. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/tags_api.dart b/mobile/openapi/lib/api/tags_api.dart index a0cdb91acf..a6840f9483 100644 --- a/mobile/openapi/lib/api/tags_api.dart +++ b/mobile/openapi/lib/api/tags_api.dart @@ -16,7 +16,9 @@ class TagsApi { final ApiClient apiClient; - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add multiple tags to multiple assets in a single request. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add multiple tags to multiple assets in a single request. /// /// Parameters: /// @@ -68,7 +72,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.create` permission. + /// Create a tag + /// + /// Create a new tag by providing a name and optional color. /// /// Note: This method returns the HTTP [Response]. /// @@ -100,7 +106,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.create` permission. + /// Create a tag + /// + /// Create a new tag by providing a name and optional color. /// /// Parameters: /// @@ -120,7 +128,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.delete` permission. + /// Delete a tag + /// + /// Delete a specific tag by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -153,7 +163,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.delete` permission. + /// Delete a tag + /// + /// Delete a specific tag by its ID. /// /// Parameters: /// @@ -165,7 +177,9 @@ class TagsApi { } } - /// This endpoint requires the `tag.read` permission. + /// Retrieve tags + /// + /// Retrieve a list of all tags. /// /// Note: This method returns the HTTP [Response]. Future getAllTagsWithHttpInfo() async { @@ -193,7 +207,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.read` permission. + /// Retrieve tags + /// + /// Retrieve a list of all tags. Future?> getAllTags() async { final response = await getAllTagsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -212,7 +228,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.read` permission. + /// Retrieve a tag + /// + /// Retrieve a specific tag by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -245,7 +263,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.read` permission. + /// Retrieve a tag + /// + /// Retrieve a specific tag by its ID. /// /// Parameters: /// @@ -265,7 +285,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add a tag to all the specified assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -300,7 +322,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.asset` permission. + /// Tag assets + /// + /// Add a tag to all the specified assets. /// /// Parameters: /// @@ -325,7 +349,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.asset` permission. + /// Untag assets + /// + /// Remove a tag from all the specified assets. /// /// Note: This method returns the HTTP [Response]. /// @@ -360,7 +386,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.asset` permission. + /// Untag assets + /// + /// Remove a tag from all the specified assets. /// /// Parameters: /// @@ -385,7 +413,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.update` permission. + /// Update a tag + /// + /// Update an existing tag identified by its ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -420,7 +450,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.update` permission. + /// Update a tag + /// + /// Update an existing tag identified by its ID. /// /// Parameters: /// @@ -442,7 +474,9 @@ class TagsApi { return null; } - /// This endpoint requires the `tag.create` permission. + /// Upsert tags + /// + /// Create or update multiple tags in a single request. /// /// Note: This method returns the HTTP [Response]. /// @@ -474,7 +508,9 @@ class TagsApi { ); } - /// This endpoint requires the `tag.create` permission. + /// Upsert tags + /// + /// Create or update multiple tags in a single request. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/timeline_api.dart b/mobile/openapi/lib/api/timeline_api.dart index 70ac076c9d..2afcea20ff 100644 --- a/mobile/openapi/lib/api/timeline_api.dart +++ b/mobile/openapi/lib/api/timeline_api.dart @@ -16,7 +16,9 @@ class TimelineApi { final ApiClient apiClient; - /// This endpoint requires the `asset.read` permission. + /// Get time bucket + /// + /// Retrieve a string of all asset ids in a given time bucket. /// /// Note: This method returns the HTTP [Response]. /// @@ -127,7 +129,9 @@ class TimelineApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Get time bucket + /// + /// Retrieve a string of all asset ids in a given time bucket. /// /// Parameters: /// @@ -185,7 +189,9 @@ class TimelineApi { return null; } - /// This endpoint requires the `asset.read` permission. + /// Get time buckets + /// + /// Retrieve a list of all minimal time buckets. /// /// Note: This method returns the HTTP [Response]. /// @@ -292,7 +298,9 @@ class TimelineApi { ); } - /// This endpoint requires the `asset.read` permission. + /// Get time buckets + /// + /// Retrieve a list of all minimal time buckets. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/trash_api.dart b/mobile/openapi/lib/api/trash_api.dart index 480d19960a..f1dcbb8896 100644 --- a/mobile/openapi/lib/api/trash_api.dart +++ b/mobile/openapi/lib/api/trash_api.dart @@ -16,7 +16,9 @@ class TrashApi { final ApiClient apiClient; - /// This endpoint requires the `asset.delete` permission. + /// Empty trash + /// + /// Permanently delete all items in the trash. /// /// Note: This method returns the HTTP [Response]. Future emptyTrashWithHttpInfo() async { @@ -44,7 +46,9 @@ class TrashApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Empty trash + /// + /// Permanently delete all items in the trash. Future emptyTrash() async { final response = await emptyTrashWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -60,7 +64,9 @@ class TrashApi { return null; } - /// This endpoint requires the `asset.delete` permission. + /// Restore assets + /// + /// Restore specific assets from the trash. /// /// Note: This method returns the HTTP [Response]. /// @@ -92,7 +98,9 @@ class TrashApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Restore assets + /// + /// Restore specific assets from the trash. /// /// Parameters: /// @@ -112,7 +120,9 @@ class TrashApi { return null; } - /// This endpoint requires the `asset.delete` permission. + /// Restore trash + /// + /// Restore all items in the trash. /// /// Note: This method returns the HTTP [Response]. Future restoreTrashWithHttpInfo() async { @@ -140,7 +150,9 @@ class TrashApi { ); } - /// This endpoint requires the `asset.delete` permission. + /// Restore trash + /// + /// Restore all items in the trash. Future restoreTrash() async { final response = await restoreTrashWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api/users_admin_api.dart b/mobile/openapi/lib/api/users_admin_api.dart index 4a4301ff43..842a3ebc5b 100644 --- a/mobile/openapi/lib/api/users_admin_api.dart +++ b/mobile/openapi/lib/api/users_admin_api.dart @@ -16,7 +16,9 @@ class UsersAdminApi { final ApiClient apiClient; - /// This endpoint is an admin-only route, and requires the `adminUser.create` permission. + /// Create a user + /// + /// Create a new user. /// /// Note: This method returns the HTTP [Response]. /// @@ -48,7 +50,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.create` permission. + /// Create a user + /// + /// Create a new user. /// /// Parameters: /// @@ -68,7 +72,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Delete a user + /// + /// Delete a user. /// /// Note: This method returns the HTTP [Response]. /// @@ -103,7 +109,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Delete a user + /// + /// Delete a user. /// /// Parameters: /// @@ -125,7 +133,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -158,7 +168,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Parameters: /// @@ -178,7 +190,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user preferences + /// + /// Retrieve the preferences of a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -211,7 +225,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user preferences + /// + /// Retrieve the preferences of a specific user. /// /// Parameters: /// @@ -231,7 +247,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminSession.read` permission. + /// Retrieve user sessions + /// + /// Retrieve all sessions for a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -264,7 +282,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminSession.read` permission. + /// Retrieve user sessions + /// + /// Retrieve all sessions for a specific user. /// /// Parameters: /// @@ -287,7 +307,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user statistics + /// + /// Retrieve asset statistics for a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -336,7 +358,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Retrieve user statistics + /// + /// Retrieve asset statistics for a specific user. /// /// Parameters: /// @@ -362,7 +386,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Restore a deleted user + /// + /// Restore a previously deleted user. /// /// Note: This method returns the HTTP [Response]. /// @@ -395,7 +421,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + /// Restore a deleted user + /// + /// Restore a previously deleted user. /// /// Parameters: /// @@ -415,7 +443,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Search users + /// + /// Search for users. /// /// Note: This method returns the HTTP [Response]. /// @@ -456,7 +486,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.read` permission. + /// Search users + /// + /// Search for users. /// /// Parameters: /// @@ -481,7 +513,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update a user + /// + /// Update an existing user. /// /// Note: This method returns the HTTP [Response]. /// @@ -516,7 +550,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update a user + /// + /// Update an existing user. /// /// Parameters: /// @@ -538,7 +574,9 @@ class UsersAdminApi { return null; } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update user preferences + /// + /// Update the preferences of a specific user. /// /// Note: This method returns the HTTP [Response]. /// @@ -573,7 +611,9 @@ class UsersAdminApi { ); } - /// This endpoint is an admin-only route, and requires the `adminUser.update` permission. + /// Update user preferences + /// + /// Update the preferences of a specific user. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/users_api.dart b/mobile/openapi/lib/api/users_api.dart index c8891ba0c2..f398d9c813 100644 --- a/mobile/openapi/lib/api/users_api.dart +++ b/mobile/openapi/lib/api/users_api.dart @@ -16,7 +16,9 @@ class UsersApi { final ApiClient apiClient; - /// This endpoint requires the `userProfileImage.update` permission. + /// Create user profile image + /// + /// Upload and set a new profile image for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -58,7 +60,9 @@ class UsersApi { ); } - /// This endpoint requires the `userProfileImage.update` permission. + /// Create user profile image + /// + /// Upload and set a new profile image for the current user. /// /// Parameters: /// @@ -78,7 +82,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userProfileImage.delete` permission. + /// Delete user profile image + /// + /// Delete the profile image of the current user. /// /// Note: This method returns the HTTP [Response]. Future deleteProfileImageWithHttpInfo() async { @@ -106,7 +112,9 @@ class UsersApi { ); } - /// This endpoint requires the `userProfileImage.delete` permission. + /// Delete user profile image + /// + /// Delete the profile image of the current user. Future deleteProfileImage() async { final response = await deleteProfileImageWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -114,7 +122,9 @@ class UsersApi { } } - /// This endpoint requires the `userLicense.delete` permission. + /// Delete user product key + /// + /// Delete the registered product key for the current user. /// /// Note: This method returns the HTTP [Response]. Future deleteUserLicenseWithHttpInfo() async { @@ -142,7 +152,9 @@ class UsersApi { ); } - /// This endpoint requires the `userLicense.delete` permission. + /// Delete user product key + /// + /// Delete the registered product key for the current user. Future deleteUserLicense() async { final response = await deleteUserLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -150,7 +162,9 @@ class UsersApi { } } - /// This endpoint requires the `userOnboarding.delete` permission. + /// Delete user onboarding + /// + /// Delete the onboarding status of the current user. /// /// Note: This method returns the HTTP [Response]. Future deleteUserOnboardingWithHttpInfo() async { @@ -178,7 +192,9 @@ class UsersApi { ); } - /// This endpoint requires the `userOnboarding.delete` permission. + /// Delete user onboarding + /// + /// Delete the onboarding status of the current user. Future deleteUserOnboarding() async { final response = await deleteUserOnboardingWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -186,7 +202,9 @@ class UsersApi { } } - /// This endpoint requires the `userPreference.read` permission. + /// Get my preferences + /// + /// Retrieve the preferences for the current user. /// /// Note: This method returns the HTTP [Response]. Future getMyPreferencesWithHttpInfo() async { @@ -214,7 +232,9 @@ class UsersApi { ); } - /// This endpoint requires the `userPreference.read` permission. + /// Get my preferences + /// + /// Retrieve the preferences for the current user. Future getMyPreferences() async { final response = await getMyPreferencesWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -230,7 +250,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.read` permission. + /// Get current user + /// + /// Retrieve information about the user making the API request. /// /// Note: This method returns the HTTP [Response]. Future getMyUserWithHttpInfo() async { @@ -258,7 +280,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.read` permission. + /// Get current user + /// + /// Retrieve information about the user making the API request. Future getMyUser() async { final response = await getMyUserWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -274,7 +298,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userProfileImage.read` permission. + /// Retrieve user profile image + /// + /// Retrieve the profile image file for a user. /// /// Note: This method returns the HTTP [Response]. /// @@ -307,7 +333,9 @@ class UsersApi { ); } - /// This endpoint requires the `userProfileImage.read` permission. + /// Retrieve user profile image + /// + /// Retrieve the profile image file for a user. /// /// Parameters: /// @@ -327,7 +355,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Note: This method returns the HTTP [Response]. /// @@ -360,7 +390,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.read` permission. + /// Retrieve a user + /// + /// Retrieve a specific user by their ID. /// /// Parameters: /// @@ -380,7 +412,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userLicense.read` permission. + /// Retrieve user product key + /// + /// Retrieve information about whether the current user has a registered product key. /// /// Note: This method returns the HTTP [Response]. Future getUserLicenseWithHttpInfo() async { @@ -408,7 +442,9 @@ class UsersApi { ); } - /// This endpoint requires the `userLicense.read` permission. + /// Retrieve user product key + /// + /// Retrieve information about whether the current user has a registered product key. Future getUserLicense() async { final response = await getUserLicenseWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -424,7 +460,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userOnboarding.read` permission. + /// Retrieve user onboarding + /// + /// Retrieve the onboarding status of the current user. /// /// Note: This method returns the HTTP [Response]. Future getUserOnboardingWithHttpInfo() async { @@ -452,7 +490,9 @@ class UsersApi { ); } - /// This endpoint requires the `userOnboarding.read` permission. + /// Retrieve user onboarding + /// + /// Retrieve the onboarding status of the current user. Future getUserOnboarding() async { final response = await getUserOnboardingWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -468,7 +508,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.read` permission. + /// Get all users + /// + /// Retrieve a list of all users on the server. /// /// Note: This method returns the HTTP [Response]. Future searchUsersWithHttpInfo() async { @@ -496,7 +538,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.read` permission. + /// Get all users + /// + /// Retrieve a list of all users on the server. Future?> searchUsers() async { final response = await searchUsersWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { @@ -515,7 +559,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userLicense.update` permission. + /// Set user product key + /// + /// Register a product key for the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -547,7 +593,9 @@ class UsersApi { ); } - /// This endpoint requires the `userLicense.update` permission. + /// Set user product key + /// + /// Register a product key for the current user. /// /// Parameters: /// @@ -567,7 +615,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userOnboarding.update` permission. + /// Update user onboarding + /// + /// Update the onboarding status of the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -599,7 +649,9 @@ class UsersApi { ); } - /// This endpoint requires the `userOnboarding.update` permission. + /// Update user onboarding + /// + /// Update the onboarding status of the current user. /// /// Parameters: /// @@ -619,7 +671,9 @@ class UsersApi { return null; } - /// This endpoint requires the `userPreference.update` permission. + /// Update my preferences + /// + /// Update the preferences of the current user. /// /// Note: This method returns the HTTP [Response]. /// @@ -651,7 +705,9 @@ class UsersApi { ); } - /// This endpoint requires the `userPreference.update` permission. + /// Update my preferences + /// + /// Update the preferences of the current user. /// /// Parameters: /// @@ -671,7 +727,9 @@ class UsersApi { return null; } - /// This endpoint requires the `user.update` permission. + /// Update current user + /// + /// Update the current user making teh API request. /// /// Note: This method returns the HTTP [Response]. /// @@ -703,7 +761,9 @@ class UsersApi { ); } - /// This endpoint requires the `user.update` permission. + /// Update current user + /// + /// Update the current user making teh API request. /// /// Parameters: /// diff --git a/mobile/openapi/lib/api/view_api.dart b/mobile/openapi/lib/api/views_api.dart similarity index 83% rename from mobile/openapi/lib/api/view_api.dart rename to mobile/openapi/lib/api/views_api.dart index 1fcaec759c..a45e89d58f 100644 --- a/mobile/openapi/lib/api/view_api.dart +++ b/mobile/openapi/lib/api/views_api.dart @@ -11,12 +11,17 @@ part of openapi.api; -class ViewApi { - ViewApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; +class ViewsApi { + ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; final ApiClient apiClient; - /// Performs an HTTP 'GET /view/folder' operation and returns the [Response]. + /// Retrieve assets by original path + /// + /// Retrieve assets that are children of a specific folder. + /// + /// Note: This method returns the HTTP [Response]. + /// /// Parameters: /// /// * [String] path (required): @@ -47,6 +52,10 @@ class ViewApi { ); } + /// Retrieve assets by original path + /// + /// Retrieve assets that are children of a specific folder. + /// /// Parameters: /// /// * [String] path (required): @@ -68,7 +77,11 @@ class ViewApi { return null; } - /// Performs an HTTP 'GET /view/folder/unique-paths' operation and returns the [Response]. + /// Retrieve unique paths + /// + /// Retrieve a list of unique folder paths from asset original paths. + /// + /// Note: This method returns the HTTP [Response]. Future getUniqueOriginalPathsWithHttpInfo() async { // ignore: prefer_const_declarations final apiPath = r'/view/folder/unique-paths'; @@ -94,6 +107,9 @@ class ViewApi { ); } + /// Retrieve unique paths + /// + /// Retrieve a list of unique folder paths from asset original paths. Future?> getUniqueOriginalPaths() async { final response = await getUniqueOriginalPathsWithHttpInfo(); if (response.statusCode >= HttpStatus.badRequest) { diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart index f61fc7e644..8718aa6da2 100644 --- a/mobile/openapi/lib/api_client.dart +++ b/mobile/openapi/lib/api_client.dart @@ -408,6 +408,8 @@ class ApiClient { return MemoryCreateDto.fromJson(value); case 'MemoryResponseDto': return MemoryResponseDto.fromJson(value); + case 'MemorySearchOrder': + return MemorySearchOrderTypeTransformer().decode(value); case 'MemoryStatisticsResponseDto': return MemoryStatisticsResponseDto.fromJson(value); case 'MemoryType': diff --git a/mobile/openapi/lib/api_helper.dart b/mobile/openapi/lib/api_helper.dart index b34e9210c8..1d197a8f91 100644 --- a/mobile/openapi/lib/api_helper.dart +++ b/mobile/openapi/lib/api_helper.dart @@ -106,6 +106,9 @@ String parameterToString(dynamic value) { if (value is ManualJobName) { return ManualJobNameTypeTransformer().encode(value).toString(); } + if (value is MemorySearchOrder) { + return MemorySearchOrderTypeTransformer().encode(value).toString(); + } if (value is MemoryType) { return MemoryTypeTypeTransformer().encode(value).toString(); } diff --git a/mobile/openapi/lib/model/memories_response.dart b/mobile/openapi/lib/model/memories_response.dart index b9f8b5d8b1..cb42f596a6 100644 --- a/mobile/openapi/lib/model/memories_response.dart +++ b/mobile/openapi/lib/model/memories_response.dart @@ -13,25 +13,31 @@ part of openapi.api; class MemoriesResponse { /// Returns a new [MemoriesResponse] instance. MemoriesResponse({ + this.duration = 5, this.enabled = true, }); + int duration; + bool enabled; @override bool operator ==(Object other) => identical(this, other) || other is MemoriesResponse && + other.duration == duration && other.enabled == enabled; @override int get hashCode => // ignore: unnecessary_parenthesis + (duration.hashCode) + (enabled.hashCode); @override - String toString() => 'MemoriesResponse[enabled=$enabled]'; + String toString() => 'MemoriesResponse[duration=$duration, enabled=$enabled]'; Map toJson() { final json = {}; + json[r'duration'] = this.duration; json[r'enabled'] = this.enabled; return json; } @@ -45,6 +51,7 @@ class MemoriesResponse { final json = value.cast(); return MemoriesResponse( + duration: mapValueOfType(json, r'duration')!, enabled: mapValueOfType(json, r'enabled')!, ); } @@ -93,6 +100,7 @@ class MemoriesResponse { /// The list of required keys that must be present in a JSON. static const requiredKeys = { + 'duration', 'enabled', }; } diff --git a/mobile/openapi/lib/model/memories_update.dart b/mobile/openapi/lib/model/memories_update.dart index 71efd71ae7..39c46ffd2f 100644 --- a/mobile/openapi/lib/model/memories_update.dart +++ b/mobile/openapi/lib/model/memories_update.dart @@ -13,9 +13,19 @@ part of openapi.api; class MemoriesUpdate { /// Returns a new [MemoriesUpdate] instance. MemoriesUpdate({ + this.duration, this.enabled, }); + /// Minimum value: 1 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? duration; + /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated @@ -26,18 +36,25 @@ class MemoriesUpdate { @override bool operator ==(Object other) => identical(this, other) || other is MemoriesUpdate && + other.duration == duration && other.enabled == enabled; @override int get hashCode => // ignore: unnecessary_parenthesis + (duration == null ? 0 : duration!.hashCode) + (enabled == null ? 0 : enabled!.hashCode); @override - String toString() => 'MemoriesUpdate[enabled=$enabled]'; + String toString() => 'MemoriesUpdate[duration=$duration, enabled=$enabled]'; Map toJson() { final json = {}; + if (this.duration != null) { + json[r'duration'] = this.duration; + } else { + // json[r'duration'] = null; + } if (this.enabled != null) { json[r'enabled'] = this.enabled; } else { @@ -55,6 +72,7 @@ class MemoriesUpdate { final json = value.cast(); return MemoriesUpdate( + duration: mapValueOfType(json, r'duration'), enabled: mapValueOfType(json, r'enabled'), ); } diff --git a/mobile/openapi/lib/model/memory_search_order.dart b/mobile/openapi/lib/model/memory_search_order.dart new file mode 100644 index 0000000000..bdf5b59894 --- /dev/null +++ b/mobile/openapi/lib/model/memory_search_order.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class MemorySearchOrder { + /// Instantiate a new enum with the provided [value]. + const MemorySearchOrder._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const asc = MemorySearchOrder._(r'asc'); + static const desc = MemorySearchOrder._(r'desc'); + static const random = MemorySearchOrder._(r'random'); + + /// List of all possible values in this [enum][MemorySearchOrder]. + static const values = [ + asc, + desc, + random, + ]; + + static MemorySearchOrder? fromJson(dynamic value) => MemorySearchOrderTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MemorySearchOrder.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [MemorySearchOrder] to String, +/// and [decode] dynamic data back to [MemorySearchOrder]. +class MemorySearchOrderTypeTransformer { + factory MemorySearchOrderTypeTransformer() => _instance ??= const MemorySearchOrderTypeTransformer._(); + + const MemorySearchOrderTypeTransformer._(); + + String encode(MemorySearchOrder data) => data.value; + + /// Decodes a [dynamic value][data] to a MemorySearchOrder. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + MemorySearchOrder? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'asc': return MemorySearchOrder.asc; + case r'desc': return MemorySearchOrder.desc; + case r'random': return MemorySearchOrder.random; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [MemorySearchOrderTypeTransformer] instance. + static MemorySearchOrderTypeTransformer? _instance; +} + diff --git a/mobile/pigeon/native_sync_api.dart b/mobile/pigeon/native_sync_api.dart index ac08a68ca3..822e2eddb3 100644 --- a/mobile/pigeon/native_sync_api.dart +++ b/mobile/pigeon/native_sync_api.dart @@ -14,8 +14,10 @@ import 'package:pigeon/pigeon.dart'; class PlatformAsset { final String id; final String name; + // Follows AssetType enum from base_asset.model.dart final int type; + // Seconds since epoch final int? createdAt; final int? updatedAt; @@ -42,6 +44,7 @@ class PlatformAsset { class PlatformAlbum { final String id; final String name; + // Seconds since epoch final int? updatedAt; final bool isCloud; @@ -60,6 +63,7 @@ class SyncDelta { final bool hasChanges; final List updates; final List deletes; + // Asset -> Album mapping final Map> assetAlbums; @@ -107,4 +111,7 @@ abstract class NativeSyncApi { List hashAssets(List assetIds, {bool allowNetworkAccess = false}); void cancelHashing(); + + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + Map> getTrashedAssets(); } diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index ec2742f980..0b10384621 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -1233,8 +1233,8 @@ packages: dependency: "direct main" description: path: "." - ref: d921ae2 - resolved-ref: d921ae210e294d2821954009ec2cc8aeae918725 + ref: e132bc3 + resolved-ref: e132bc3ecc6a6d8fc2089d96f849c8a13129500e url: "https://github.com/immich-app/native_video_player" source: git version: "1.3.1" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index aea97a25b3..617516b94a 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -2,7 +2,7 @@ name: immich_mobile description: Immich - selfhosted backup media file on mobile phone publish_to: 'none' -version: 2.2.0+3023 +version: 2.2.3+3026 environment: sdk: '>=3.8.0 <4.0.0' @@ -57,7 +57,7 @@ dependencies: native_video_player: git: url: https://github.com/immich-app/native_video_player - ref: 'd921ae2' + ref: 'e132bc3' network_info_plus: ^6.1.3 octo_image: ^2.1.0 openapi: diff --git a/mobile/scripts/fdroid_build_isar.sh b/mobile/scripts/fdroid_build_isar.sh index f42bc51d9a..a145268356 100755 --- a/mobile/scripts/fdroid_build_isar.sh +++ b/mobile/scripts/fdroid_build_isar.sh @@ -8,11 +8,11 @@ bash tool/build_android.sh x64 bash tool/build_android.sh armv7 bash tool/build_android.sh arm64 mv libisar_android_arm64.so libisar.so -mv libisar.so ../.pub-cache/hosted/pub.isar-community.dev/isar_flutter_libs-*/android/src/main/jniLibs/arm64-v8a/ +mv libisar.so ../.pub-cache/hosted/pub.dev/isar_community_flutter_libs-*/android/src/main/jniLibs/arm64-v8a/ mv libisar_android_armv7.so libisar.so -mv libisar.so ../.pub-cache/hosted/pub.isar-community.dev/isar_flutter_libs-*/android/src/main/jniLibs/armeabi-v7a/ +mv libisar.so ../.pub-cache/hosted/pub.dev/isar_community_flutter_libs-*/android/src/main/jniLibs/armeabi-v7a/ mv libisar_android_x64.so libisar.so -mv libisar.so ../.pub-cache/hosted/pub.isar-community.dev/isar_flutter_libs-*/android/src/main/jniLibs/x86_64/ +mv libisar.so ../.pub-cache/hosted/pub.dev/isar_community_flutter_libs-*/android/src/main/jniLibs/x86_64/ mv libisar_android_x86.so libisar.so -mv libisar.so ../.pub-cache/hosted/pub.isar-community.dev/isar_flutter_libs-*/android/src/main/jniLibs/x86/ -) \ No newline at end of file +mv libisar.so ../.pub-cache/hosted/pub.dev/isar_community_flutter_libs-*/android/src/main/jniLibs/x86/ +) diff --git a/mobile/test/domain/service.mock.dart b/mobile/test/domain/service.mock.dart index 8293faf125..0bab675889 100644 --- a/mobile/test/domain/service.mock.dart +++ b/mobile/test/domain/service.mock.dart @@ -17,3 +17,4 @@ class MockNativeSyncApi extends Mock implements NativeSyncApi {} class MockAppSettingsService extends Mock implements AppSettingsService {} class MockUploadService extends Mock implements UploadService {} + diff --git a/mobile/test/domain/services/hash_service_test.dart b/mobile/test/domain/services/hash_service_test.dart index 20d60b6866..3529ecca38 100644 --- a/mobile/test/domain/services/hash_service_test.dart +++ b/mobile/test/domain/services/hash_service_test.dart @@ -14,16 +14,19 @@ void main() { late MockLocalAlbumRepository mockAlbumRepo; late MockLocalAssetRepository mockAssetRepo; late MockNativeSyncApi mockNativeApi; + late MockTrashedLocalAssetRepository mockTrashedAssetRepo; setUp(() { mockAlbumRepo = MockLocalAlbumRepository(); mockAssetRepo = MockLocalAssetRepository(); mockNativeApi = MockNativeSyncApi(); + mockTrashedAssetRepo = MockTrashedLocalAssetRepository(); sut = HashService( localAlbumRepository: mockAlbumRepo, localAssetRepository: mockAssetRepo, nativeSyncApi: mockNativeApi, + trashedLocalAssetRepository: mockTrashedAssetRepo, ); registerFallbackValue(LocalAlbumStub.recent); @@ -114,6 +117,7 @@ void main() { localAssetRepository: mockAssetRepo, nativeSyncApi: mockNativeApi, batchSize: batchSize, + trashedLocalAssetRepository: mockTrashedAssetRepo, ); final album = LocalAlbumStub.recent; @@ -186,4 +190,5 @@ void main() { verify(() => mockNativeApi.hashAssets([asset2.id], allowNetworkAccess: false)).called(1); }); }); + } diff --git a/mobile/test/domain/services/local_sync_service_test.dart b/mobile/test/domain/services/local_sync_service_test.dart new file mode 100644 index 0000000000..2f236971e0 --- /dev/null +++ b/mobile/test/domain/services/local_sync_service_test.dart @@ -0,0 +1,190 @@ +import 'package:drift/drift.dart' as drift; +import 'package:drift/native.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/domain/services/local_sync.service.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; +import 'package:immich_mobile/entities/store.entity.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/local_album.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/storage.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; +import 'package:immich_mobile/platform/native_sync_api.g.dart'; +import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; +import 'package:mocktail/mocktail.dart'; + +import '../../domain/service.mock.dart'; +import '../../fixtures/asset.stub.dart'; +import '../../infrastructure/repository.mock.dart'; +import '../../mocks/asset_entity.mock.dart'; +import '../../repository.mocks.dart'; + +void main() { + late LocalSyncService sut; + late DriftLocalAlbumRepository mockLocalAlbumRepository; + late DriftTrashedLocalAssetRepository mockTrashedLocalAssetRepository; + late LocalFilesManagerRepository mockLocalFilesManager; + late StorageRepository mockStorageRepository; + late MockNativeSyncApi mockNativeSyncApi; + late Drift db; + + setUpAll(() async { + TestWidgetsFlutterBinding.ensureInitialized(); + debugDefaultTargetPlatformOverride = TargetPlatform.android; + + db = Drift(drift.DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await StoreService.init(storeRepository: DriftStoreRepository(db)); + }); + + tearDownAll(() async { + debugDefaultTargetPlatformOverride = null; + await Store.clear(); + await db.close(); + }); + + setUp(() async { + mockLocalAlbumRepository = MockLocalAlbumRepository(); + mockTrashedLocalAssetRepository = MockTrashedLocalAssetRepository(); + mockLocalFilesManager = MockLocalFilesManagerRepository(); + mockStorageRepository = MockStorageRepository(); + mockNativeSyncApi = MockNativeSyncApi(); + + when(() => mockNativeSyncApi.shouldFullSync()).thenAnswer((_) async => false); + when(() => mockNativeSyncApi.getMediaChanges()).thenAnswer( + (_) async => SyncDelta( + hasChanges: false, + updates: const [], + deletes: const [], + assetAlbums: const {}, + ), + ); + when(() => mockNativeSyncApi.getTrashedAssets()).thenAnswer((_) async => {}); + when(() => mockTrashedLocalAssetRepository.processTrashSnapshot(any())).thenAnswer((_) async {}); + when(() => mockTrashedLocalAssetRepository.getToRestore()).thenAnswer((_) async => []); + when(() => mockTrashedLocalAssetRepository.getToTrash()).thenAnswer((_) async => {}); + when(() => mockTrashedLocalAssetRepository.applyRestoredAssets(any())).thenAnswer((_) async {}); + when(() => mockTrashedLocalAssetRepository.trashLocalAsset(any())).thenAnswer((_) async {}); + when(() => mockLocalFilesManager.moveToTrash(any>())).thenAnswer((_) async => true); + + sut = LocalSyncService( + localAlbumRepository: mockLocalAlbumRepository, + trashedLocalAssetRepository: mockTrashedLocalAssetRepository, + localFilesManager: mockLocalFilesManager, + storageRepository: mockStorageRepository, + nativeSyncApi: mockNativeSyncApi, + ); + + await Store.put(StoreKey.manageLocalMediaAndroid, false); + when(() => mockLocalFilesManager.hasManageMediaPermission()).thenAnswer((_) async => false); + }); + + group('LocalSyncService - syncTrashedAssets gating', () { + test('invokes syncTrashedAssets when Android flag enabled and permission granted', () async { + await Store.put(StoreKey.manageLocalMediaAndroid, true); + when(() => mockLocalFilesManager.hasManageMediaPermission()).thenAnswer((_) async => true); + + await sut.sync(); + + verify(() => mockNativeSyncApi.getTrashedAssets()).called(1); + verify(() => mockTrashedLocalAssetRepository.processTrashSnapshot(any())).called(1); + }); + + test('skips syncTrashedAssets when store flag disabled', () async { + await Store.put(StoreKey.manageLocalMediaAndroid, false); + when(() => mockLocalFilesManager.hasManageMediaPermission()).thenAnswer((_) async => true); + + await sut.sync(); + + verifyNever(() => mockNativeSyncApi.getTrashedAssets()); + }); + + test('skips syncTrashedAssets when MANAGE_MEDIA permission absent', () async { + await Store.put(StoreKey.manageLocalMediaAndroid, true); + when(() => mockLocalFilesManager.hasManageMediaPermission()).thenAnswer((_) async => false); + + await sut.sync(); + + verifyNever(() => mockNativeSyncApi.getTrashedAssets()); + }); + + test('skips syncTrashedAssets on non-Android platforms', () async { + debugDefaultTargetPlatformOverride = TargetPlatform.iOS; + addTearDown(() => debugDefaultTargetPlatformOverride = TargetPlatform.android); + + await Store.put(StoreKey.manageLocalMediaAndroid, true); + when(() => mockLocalFilesManager.hasManageMediaPermission()).thenAnswer((_) async => true); + + await sut.sync(); + + verifyNever(() => mockNativeSyncApi.getTrashedAssets()); + }); + }); + + group('LocalSyncService - syncTrashedAssets behavior', () { + test('processes trashed snapshot, restores assets, and trashes local files', () async { + final platformAsset = PlatformAsset( + id: 'remote-id', + name: 'remote.jpg', + type: AssetType.image.index, + durationInSeconds: 0, + orientation: 0, + isFavorite: false, + ); + + final assetsToRestore = [LocalAssetStub.image1]; + when(() => mockTrashedLocalAssetRepository.getToRestore()).thenAnswer((_) async => assetsToRestore); + final restoredIds = ['image1']; + when(() => mockLocalFilesManager.restoreAssetsFromTrash(any())).thenAnswer((invocation) async { + final Iterable requested = invocation.positionalArguments.first as Iterable; + expect(requested, orderedEquals(assetsToRestore)); + return restoredIds; + }); + + final localAssetToTrash = LocalAssetStub.image2.copyWith(id: 'local-trash', checksum: 'checksum-trash'); + when(() => mockTrashedLocalAssetRepository.getToTrash()).thenAnswer((_) async => {'album-a': [localAssetToTrash]}); + + final assetEntity = MockAssetEntity(); + when(() => assetEntity.getMediaUrl()).thenAnswer((_) async => 'content://local-trash'); + when(() => mockStorageRepository.getAssetEntityForAsset(localAssetToTrash)).thenAnswer((_) async => assetEntity); + + await sut.processTrashedAssets({'album-a': [platformAsset]}); + + verify(() => mockTrashedLocalAssetRepository.processTrashSnapshot(any())).called(1); + verify(() => mockTrashedLocalAssetRepository.getToTrash()).called(1); + + verify(() => mockLocalFilesManager.restoreAssetsFromTrash(any())).called(1); + verify(() => mockTrashedLocalAssetRepository.applyRestoredAssets(restoredIds)).called(1); + + verify(() => mockStorageRepository.getAssetEntityForAsset(localAssetToTrash)).called(1); + final moveArgs = + verify(() => mockLocalFilesManager.moveToTrash(captureAny())).captured.single as List; + expect(moveArgs, ['content://local-trash']); + final trashArgs = + verify(() => mockTrashedLocalAssetRepository.trashLocalAsset(captureAny())).captured.single + as Map>; + expect(trashArgs.keys, ['album-a']); + expect(trashArgs['album-a'], [localAssetToTrash]); + }); + + test('does not attempt restore when repository has no assets to restore', () async { + when(() => mockTrashedLocalAssetRepository.getToRestore()).thenAnswer((_) async => []); + + await sut.processTrashedAssets({}); + + verifyNever(() => mockLocalFilesManager.restoreAssetsFromTrash(any())); + verifyNever(() => mockTrashedLocalAssetRepository.applyRestoredAssets(any())); + }); + + test('does not move local assets when repository finds nothing to trash', () async { + when(() => mockTrashedLocalAssetRepository.getToTrash()).thenAnswer((_) async => {}); + + await sut.processTrashedAssets({}); + + verifyNever(() => mockLocalFilesManager.moveToTrash(any())); + verifyNever(() => mockTrashedLocalAssetRepository.trashLocalAsset(any())); + }); + }); +} diff --git a/mobile/test/domain/services/sync_stream_service_test.dart b/mobile/test/domain/services/sync_stream_service_test.dart index 0126b11e46..109b54a907 100644 --- a/mobile/test/domain/services/sync_stream_service_test.dart +++ b/mobile/test/domain/services/sync_stream_service_test.dart @@ -1,14 +1,30 @@ import 'dart:async'; +import 'package:drift/drift.dart' as drift; +import 'package:drift/native.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/domain/models/asset/base_asset.model.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; import 'package:immich_mobile/domain/models/sync_event.model.dart'; +import 'package:immich_mobile/domain/services/store.service.dart'; import 'package:immich_mobile/domain/services/sync_stream.service.dart'; +import 'package:immich_mobile/entities/store.entity.dart'; +import 'package:immich_mobile/infrastructure/repositories/db.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/local_asset.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/storage.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_api.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; +import 'package:immich_mobile/repositories/local_files_manager.repository.dart'; import 'package:mocktail/mocktail.dart'; +import '../../fixtures/asset.stub.dart'; import '../../fixtures/sync_stream.stub.dart'; import '../../infrastructure/repository.mock.dart'; +import '../../mocks/asset_entity.mock.dart'; +import '../../repository.mocks.dart'; class _AbortCallbackWrapper { const _AbortCallbackWrapper(); @@ -30,15 +46,40 @@ void main() { late SyncStreamService sut; late SyncStreamRepository mockSyncStreamRepo; late SyncApiRepository mockSyncApiRepo; + late DriftLocalAssetRepository mockLocalAssetRepo; + late DriftTrashedLocalAssetRepository mockTrashedLocalAssetRepo; + late LocalFilesManagerRepository mockLocalFilesManagerRepo; + late StorageRepository mockStorageRepo; late Future Function(List, Function(), Function()) handleEventsCallback; late _MockAbortCallbackWrapper mockAbortCallbackWrapper; late _MockAbortCallbackWrapper mockResetCallbackWrapper; + late Drift db; + late bool hasManageMediaPermission; + + setUpAll(() async { + TestWidgetsFlutterBinding.ensureInitialized(); + debugDefaultTargetPlatformOverride = TargetPlatform.android; + registerFallbackValue(LocalAssetStub.image1); + + db = Drift(drift.DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true)); + await StoreService.init(storeRepository: DriftStoreRepository(db)); + }); + + tearDownAll(() async { + debugDefaultTargetPlatformOverride = null; + await Store.clear(); + await db.close(); + }); successHandler(Invocation _) async => true; - setUp(() { + setUp(() async { mockSyncStreamRepo = MockSyncStreamRepository(); mockSyncApiRepo = MockSyncApiRepository(); + mockLocalAssetRepo = MockLocalAssetRepository(); + mockTrashedLocalAssetRepo = MockTrashedLocalAssetRepository(); + mockLocalFilesManagerRepo = MockLocalFilesManagerRepository(); + mockStorageRepo = MockStorageRepository(); mockAbortCallbackWrapper = _MockAbortCallbackWrapper(); mockResetCallbackWrapper = _MockAbortCallbackWrapper(); @@ -87,7 +128,25 @@ void main() { when(() => mockSyncStreamRepo.updateAssetFacesV1(any())).thenAnswer(successHandler); when(() => mockSyncStreamRepo.deleteAssetFacesV1(any())).thenAnswer(successHandler); - sut = SyncStreamService(syncApiRepository: mockSyncApiRepo, syncStreamRepository: mockSyncStreamRepo); + sut = SyncStreamService( + syncApiRepository: mockSyncApiRepo, + syncStreamRepository: mockSyncStreamRepo, + localAssetRepository: mockLocalAssetRepo, + trashedLocalAssetRepository: mockTrashedLocalAssetRepo, + localFilesManager: mockLocalFilesManagerRepo, + storageRepository: mockStorageRepo, + ); + + when(() => mockLocalAssetRepo.getAssetsFromBackupAlbums(any())).thenAnswer((_) async => {}); + when(() => mockTrashedLocalAssetRepo.trashLocalAsset(any())).thenAnswer((_) async {}); + when(() => mockTrashedLocalAssetRepo.getToRestore()).thenAnswer((_) async => []); + when(() => mockTrashedLocalAssetRepo.applyRestoredAssets(any())).thenAnswer((_) async {}); + hasManageMediaPermission = false; + when(() => mockLocalFilesManagerRepo.hasManageMediaPermission()).thenAnswer((_) async => hasManageMediaPermission); + when(() => mockLocalFilesManagerRepo.moveToTrash(any())).thenAnswer((_) async => true); + when(() => mockLocalFilesManagerRepo.restoreAssetsFromTrash(any())).thenAnswer((_) async => []); + when(() => mockStorageRepo.getAssetEntityForAsset(any())).thenAnswer((_) async => null); + await Store.put(StoreKey.manageLocalMediaAndroid, false); }); Future simulateEvents(List events) async { @@ -152,6 +211,10 @@ void main() { sut = SyncStreamService( syncApiRepository: mockSyncApiRepo, syncStreamRepository: mockSyncStreamRepo, + localAssetRepository: mockLocalAssetRepo, + trashedLocalAssetRepository: mockTrashedLocalAssetRepo, + localFilesManager: mockLocalFilesManagerRepo, + storageRepository: mockStorageRepo, cancelChecker: cancellationChecker.call, ); await sut.sync(); @@ -187,6 +250,10 @@ void main() { sut = SyncStreamService( syncApiRepository: mockSyncApiRepo, syncStreamRepository: mockSyncStreamRepo, + localAssetRepository: mockLocalAssetRepo, + trashedLocalAssetRepository: mockTrashedLocalAssetRepo, + localFilesManager: mockLocalFilesManagerRepo, + storageRepository: mockStorageRepo, cancelChecker: cancellationChecker.call, ); @@ -296,4 +363,127 @@ void main() { verify(() => mockSyncApiRepo.ack(["5"])).called(1); }); }); + + group("SyncStreamService - remote trash & restore", () { + setUp(() async { + await Store.put(StoreKey.manageLocalMediaAndroid, true); + hasManageMediaPermission = true; + }); + + tearDown(() async { + await Store.put(StoreKey.manageLocalMediaAndroid, false); + hasManageMediaPermission = false; + }); + + test("moves backed up local and merged assets to device trash when remote trash events are received", () async { + final localAsset = LocalAssetStub.image1.copyWith(id: 'local-only', checksum: 'checksum-local', remoteId: null); + final mergedAsset = LocalAssetStub.image2.copyWith( + id: 'merged-local', + checksum: 'checksum-merged', + remoteId: 'remote-merged', + ); + final assetsByAlbum = { + 'album-a': [localAsset], + 'album-b': [mergedAsset], + }; + when(() => mockLocalAssetRepo.getAssetsFromBackupAlbums(any())).thenAnswer((invocation) async { + final Iterable requestedChecksums = invocation.positionalArguments.first as Iterable; + expect(requestedChecksums.toSet(), equals({'checksum-local', 'checksum-merged', 'checksum-remote-only'})); + return assetsByAlbum; + }); + + final localEntity = MockAssetEntity(); + when(() => localEntity.getMediaUrl()).thenAnswer((_) async => 'content://local-only'); + when(() => mockStorageRepo.getAssetEntityForAsset(localAsset)).thenAnswer((_) async => localEntity); + + final mergedEntity = MockAssetEntity(); + when(() => mergedEntity.getMediaUrl()).thenAnswer((_) async => 'content://merged-local'); + when(() => mockStorageRepo.getAssetEntityForAsset(mergedAsset)).thenAnswer((_) async => mergedEntity); + + when(() => mockLocalFilesManagerRepo.moveToTrash(any())).thenAnswer((invocation) async { + final urls = invocation.positionalArguments.first as List; + expect(urls, unorderedEquals(['content://local-only', 'content://merged-local'])); + return true; + }); + + final events = [ + SyncStreamStub.assetTrashed( + id: 'remote-1', + checksum: localAsset.checksum!, + ack: 'asset-remote-local-1', + trashedAt: DateTime(2025, 5, 1), + ), + SyncStreamStub.assetTrashed( + id: 'remote-2', + checksum: mergedAsset.checksum!, + ack: 'asset-remote-merged-2', + trashedAt: DateTime(2025, 5, 2), + ), + SyncStreamStub.assetTrashed( + id: 'remote-3', + checksum: 'checksum-remote-only', + ack: 'asset-remote-only-3', + trashedAt: DateTime(2025, 5, 3), + ), + ]; + + await simulateEvents(events); + + verify(() => mockTrashedLocalAssetRepo.trashLocalAsset(assetsByAlbum)).called(1); + verify(() => mockSyncApiRepo.ack(['asset-remote-only-3'])).called(1); + }); + + test("skips device trashing when no local assets match the remote trash payload", () async { + final events = [ + SyncStreamStub.assetTrashed( + id: 'remote-only', + checksum: 'checksum-only', + ack: 'asset-remote-only-9', + trashedAt: DateTime(2025, 6, 1), + ), + ]; + + await simulateEvents(events); + + verify(() => mockLocalAssetRepo.getAssetsFromBackupAlbums(any())).called(1); + verifyNever(() => mockLocalFilesManagerRepo.moveToTrash(any())); + verifyNever(() => mockTrashedLocalAssetRepo.trashLocalAsset(any())); + }); + + test("does not request local deletions for permanent remote delete events", () async { + final events = [SyncStreamStub.assetDeleteV1]; + + await simulateEvents(events); + + verifyNever(() => mockLocalAssetRepo.getAssetsFromBackupAlbums(any())); + verifyNever(() => mockLocalFilesManagerRepo.moveToTrash(any())); + verify(() => mockSyncStreamRepo.deleteAssetsV1(any())).called(1); + }); + + test("restores trashed local assets once the matching remote assets leave the trash", () async { + final trashedAssets = [ + LocalAssetStub.image1.copyWith(id: 'trashed-1', checksum: 'checksum-trash', remoteId: 'remote-1'), + ]; + when(() => mockTrashedLocalAssetRepo.getToRestore()).thenAnswer((_) async => trashedAssets); + + final restoredIds = ['trashed-1']; + when(() => mockLocalFilesManagerRepo.restoreAssetsFromTrash(any())).thenAnswer((invocation) async { + final Iterable requestedAssets = invocation.positionalArguments.first as Iterable; + expect(requestedAssets, orderedEquals(trashedAssets)); + return restoredIds; + }); + + final events = [ + SyncStreamStub.assetModified( + id: 'remote-1', + checksum: 'checksum-trash', + ack: 'asset-remote-1-11', + ), + ]; + + await simulateEvents(events); + + verify(() => mockTrashedLocalAssetRepo.applyRestoredAssets(restoredIds)).called(1); + }); + }); } diff --git a/mobile/test/drift/main/generated/schema.dart b/mobile/test/drift/main/generated/schema.dart index 073a86078f..69dff89fb1 100644 --- a/mobile/test/drift/main/generated/schema.dart +++ b/mobile/test/drift/main/generated/schema.dart @@ -15,6 +15,7 @@ import 'schema_v9.dart' as v9; import 'schema_v10.dart' as v10; import 'schema_v11.dart' as v11; import 'schema_v12.dart' as v12; +import 'schema_v13.dart' as v13; class GeneratedHelper implements SchemaInstantiationHelper { @override @@ -44,10 +45,12 @@ class GeneratedHelper implements SchemaInstantiationHelper { return v11.DatabaseAtV11(db); case 12: return v12.DatabaseAtV12(db); + case 13: + return v13.DatabaseAtV13(db); default: throw MissingSchemaException(version, versions); } } - static const versions = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; + static const versions = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; } diff --git a/mobile/test/drift/main/generated/schema_v13.dart b/mobile/test/drift/main/generated/schema_v13.dart new file mode 100644 index 0000000000..da0d853678 --- /dev/null +++ b/mobile/test/drift/main/generated/schema_v13.dart @@ -0,0 +1,7765 @@ +// dart format width=80 +// GENERATED CODE, DO NOT EDIT BY HAND. +// ignore_for_file: type=lint +import 'package:drift/drift.dart'; + +class UserEntity extends Table with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + UserEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn email = GeneratedColumn( + 'email', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn hasProfileImage = GeneratedColumn( + 'has_profile_image', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("has_profile_image" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn profileChangedAt = + GeneratedColumn( + 'profile_changed_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn avatarColor = GeneratedColumn( + 'avatar_color', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: false, + defaultValue: const CustomExpression('0'), + ); + @override + List get $columns => [ + id, + name, + email, + hasProfileImage, + profileChangedAt, + avatarColor, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'user_entity'; + @override + Set get $primaryKey => {id}; + @override + UserEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return UserEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + email: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}email'], + )!, + hasProfileImage: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}has_profile_image'], + )!, + profileChangedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}profile_changed_at'], + )!, + avatarColor: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}avatar_color'], + )!, + ); + } + + @override + UserEntity createAlias(String alias) { + return UserEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class UserEntityData extends DataClass implements Insertable { + final String id; + final String name; + final String email; + final bool hasProfileImage; + final DateTime profileChangedAt; + final int avatarColor; + const UserEntityData({ + required this.id, + required this.name, + required this.email, + required this.hasProfileImage, + required this.profileChangedAt, + required this.avatarColor, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['name'] = Variable(name); + map['email'] = Variable(email); + map['has_profile_image'] = Variable(hasProfileImage); + map['profile_changed_at'] = Variable(profileChangedAt); + map['avatar_color'] = Variable(avatarColor); + return map; + } + + factory UserEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return UserEntityData( + id: serializer.fromJson(json['id']), + name: serializer.fromJson(json['name']), + email: serializer.fromJson(json['email']), + hasProfileImage: serializer.fromJson(json['hasProfileImage']), + profileChangedAt: serializer.fromJson(json['profileChangedAt']), + avatarColor: serializer.fromJson(json['avatarColor']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'name': serializer.toJson(name), + 'email': serializer.toJson(email), + 'hasProfileImage': serializer.toJson(hasProfileImage), + 'profileChangedAt': serializer.toJson(profileChangedAt), + 'avatarColor': serializer.toJson(avatarColor), + }; + } + + UserEntityData copyWith({ + String? id, + String? name, + String? email, + bool? hasProfileImage, + DateTime? profileChangedAt, + int? avatarColor, + }) => UserEntityData( + id: id ?? this.id, + name: name ?? this.name, + email: email ?? this.email, + hasProfileImage: hasProfileImage ?? this.hasProfileImage, + profileChangedAt: profileChangedAt ?? this.profileChangedAt, + avatarColor: avatarColor ?? this.avatarColor, + ); + UserEntityData copyWithCompanion(UserEntityCompanion data) { + return UserEntityData( + id: data.id.present ? data.id.value : this.id, + name: data.name.present ? data.name.value : this.name, + email: data.email.present ? data.email.value : this.email, + hasProfileImage: data.hasProfileImage.present + ? data.hasProfileImage.value + : this.hasProfileImage, + profileChangedAt: data.profileChangedAt.present + ? data.profileChangedAt.value + : this.profileChangedAt, + avatarColor: data.avatarColor.present + ? data.avatarColor.value + : this.avatarColor, + ); + } + + @override + String toString() { + return (StringBuffer('UserEntityData(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('email: $email, ') + ..write('hasProfileImage: $hasProfileImage, ') + ..write('profileChangedAt: $profileChangedAt, ') + ..write('avatarColor: $avatarColor') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + name, + email, + hasProfileImage, + profileChangedAt, + avatarColor, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is UserEntityData && + other.id == this.id && + other.name == this.name && + other.email == this.email && + other.hasProfileImage == this.hasProfileImage && + other.profileChangedAt == this.profileChangedAt && + other.avatarColor == this.avatarColor); +} + +class UserEntityCompanion extends UpdateCompanion { + final Value id; + final Value name; + final Value email; + final Value hasProfileImage; + final Value profileChangedAt; + final Value avatarColor; + const UserEntityCompanion({ + this.id = const Value.absent(), + this.name = const Value.absent(), + this.email = const Value.absent(), + this.hasProfileImage = const Value.absent(), + this.profileChangedAt = const Value.absent(), + this.avatarColor = const Value.absent(), + }); + UserEntityCompanion.insert({ + required String id, + required String name, + required String email, + this.hasProfileImage = const Value.absent(), + this.profileChangedAt = const Value.absent(), + this.avatarColor = const Value.absent(), + }) : id = Value(id), + name = Value(name), + email = Value(email); + static Insertable custom({ + Expression? id, + Expression? name, + Expression? email, + Expression? hasProfileImage, + Expression? profileChangedAt, + Expression? avatarColor, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (name != null) 'name': name, + if (email != null) 'email': email, + if (hasProfileImage != null) 'has_profile_image': hasProfileImage, + if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, + if (avatarColor != null) 'avatar_color': avatarColor, + }); + } + + UserEntityCompanion copyWith({ + Value? id, + Value? name, + Value? email, + Value? hasProfileImage, + Value? profileChangedAt, + Value? avatarColor, + }) { + return UserEntityCompanion( + id: id ?? this.id, + name: name ?? this.name, + email: email ?? this.email, + hasProfileImage: hasProfileImage ?? this.hasProfileImage, + profileChangedAt: profileChangedAt ?? this.profileChangedAt, + avatarColor: avatarColor ?? this.avatarColor, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (name.present) { + map['name'] = Variable(name.value); + } + if (email.present) { + map['email'] = Variable(email.value); + } + if (hasProfileImage.present) { + map['has_profile_image'] = Variable(hasProfileImage.value); + } + if (profileChangedAt.present) { + map['profile_changed_at'] = Variable(profileChangedAt.value); + } + if (avatarColor.present) { + map['avatar_color'] = Variable(avatarColor.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('UserEntityCompanion(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('email: $email, ') + ..write('hasProfileImage: $hasProfileImage, ') + ..write('profileChangedAt: $profileChangedAt, ') + ..write('avatarColor: $avatarColor') + ..write(')')) + .toString(); + } +} + +class RemoteAssetEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + RemoteAssetEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn type = GeneratedColumn( + 'type', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn width = GeneratedColumn( + 'width', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn height = GeneratedColumn( + 'height', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn durationInSeconds = GeneratedColumn( + 'duration_in_seconds', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn checksum = GeneratedColumn( + 'checksum', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn isFavorite = GeneratedColumn( + 'is_favorite', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_favorite" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn ownerId = GeneratedColumn( + 'owner_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn localDateTime = + GeneratedColumn( + 'local_date_time', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + late final GeneratedColumn thumbHash = GeneratedColumn( + 'thumb_hash', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn deletedAt = GeneratedColumn( + 'deleted_at', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + late final GeneratedColumn livePhotoVideoId = GeneratedColumn( + 'live_photo_video_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn visibility = GeneratedColumn( + 'visibility', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn stackId = GeneratedColumn( + 'stack_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn libraryId = GeneratedColumn( + 'library_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + @override + List get $columns => [ + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + checksum, + isFavorite, + ownerId, + localDateTime, + thumbHash, + deletedAt, + livePhotoVideoId, + visibility, + stackId, + libraryId, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'remote_asset_entity'; + @override + Set get $primaryKey => {id}; + @override + RemoteAssetEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return RemoteAssetEntityData( + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + type: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}type'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + width: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}width'], + ), + height: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}height'], + ), + durationInSeconds: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}duration_in_seconds'], + ), + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + checksum: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}checksum'], + )!, + isFavorite: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_favorite'], + )!, + ownerId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}owner_id'], + )!, + localDateTime: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}local_date_time'], + ), + thumbHash: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}thumb_hash'], + ), + deletedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}deleted_at'], + ), + livePhotoVideoId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}live_photo_video_id'], + ), + visibility: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}visibility'], + )!, + stackId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}stack_id'], + ), + libraryId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}library_id'], + ), + ); + } + + @override + RemoteAssetEntity createAlias(String alias) { + return RemoteAssetEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class RemoteAssetEntityData extends DataClass + implements Insertable { + final String name; + final int type; + final DateTime createdAt; + final DateTime updatedAt; + final int? width; + final int? height; + final int? durationInSeconds; + final String id; + final String checksum; + final bool isFavorite; + final String ownerId; + final DateTime? localDateTime; + final String? thumbHash; + final DateTime? deletedAt; + final String? livePhotoVideoId; + final int visibility; + final String? stackId; + final String? libraryId; + const RemoteAssetEntityData({ + required this.name, + required this.type, + required this.createdAt, + required this.updatedAt, + this.width, + this.height, + this.durationInSeconds, + required this.id, + required this.checksum, + required this.isFavorite, + required this.ownerId, + this.localDateTime, + this.thumbHash, + this.deletedAt, + this.livePhotoVideoId, + required this.visibility, + this.stackId, + this.libraryId, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['name'] = Variable(name); + map['type'] = Variable(type); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + if (!nullToAbsent || width != null) { + map['width'] = Variable(width); + } + if (!nullToAbsent || height != null) { + map['height'] = Variable(height); + } + if (!nullToAbsent || durationInSeconds != null) { + map['duration_in_seconds'] = Variable(durationInSeconds); + } + map['id'] = Variable(id); + map['checksum'] = Variable(checksum); + map['is_favorite'] = Variable(isFavorite); + map['owner_id'] = Variable(ownerId); + if (!nullToAbsent || localDateTime != null) { + map['local_date_time'] = Variable(localDateTime); + } + if (!nullToAbsent || thumbHash != null) { + map['thumb_hash'] = Variable(thumbHash); + } + if (!nullToAbsent || deletedAt != null) { + map['deleted_at'] = Variable(deletedAt); + } + if (!nullToAbsent || livePhotoVideoId != null) { + map['live_photo_video_id'] = Variable(livePhotoVideoId); + } + map['visibility'] = Variable(visibility); + if (!nullToAbsent || stackId != null) { + map['stack_id'] = Variable(stackId); + } + if (!nullToAbsent || libraryId != null) { + map['library_id'] = Variable(libraryId); + } + return map; + } + + factory RemoteAssetEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return RemoteAssetEntityData( + name: serializer.fromJson(json['name']), + type: serializer.fromJson(json['type']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + width: serializer.fromJson(json['width']), + height: serializer.fromJson(json['height']), + durationInSeconds: serializer.fromJson(json['durationInSeconds']), + id: serializer.fromJson(json['id']), + checksum: serializer.fromJson(json['checksum']), + isFavorite: serializer.fromJson(json['isFavorite']), + ownerId: serializer.fromJson(json['ownerId']), + localDateTime: serializer.fromJson(json['localDateTime']), + thumbHash: serializer.fromJson(json['thumbHash']), + deletedAt: serializer.fromJson(json['deletedAt']), + livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), + visibility: serializer.fromJson(json['visibility']), + stackId: serializer.fromJson(json['stackId']), + libraryId: serializer.fromJson(json['libraryId']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'name': serializer.toJson(name), + 'type': serializer.toJson(type), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'width': serializer.toJson(width), + 'height': serializer.toJson(height), + 'durationInSeconds': serializer.toJson(durationInSeconds), + 'id': serializer.toJson(id), + 'checksum': serializer.toJson(checksum), + 'isFavorite': serializer.toJson(isFavorite), + 'ownerId': serializer.toJson(ownerId), + 'localDateTime': serializer.toJson(localDateTime), + 'thumbHash': serializer.toJson(thumbHash), + 'deletedAt': serializer.toJson(deletedAt), + 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), + 'visibility': serializer.toJson(visibility), + 'stackId': serializer.toJson(stackId), + 'libraryId': serializer.toJson(libraryId), + }; + } + + RemoteAssetEntityData copyWith({ + String? name, + int? type, + DateTime? createdAt, + DateTime? updatedAt, + Value width = const Value.absent(), + Value height = const Value.absent(), + Value durationInSeconds = const Value.absent(), + String? id, + String? checksum, + bool? isFavorite, + String? ownerId, + Value localDateTime = const Value.absent(), + Value thumbHash = const Value.absent(), + Value deletedAt = const Value.absent(), + Value livePhotoVideoId = const Value.absent(), + int? visibility, + Value stackId = const Value.absent(), + Value libraryId = const Value.absent(), + }) => RemoteAssetEntityData( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width.present ? width.value : this.width, + height: height.present ? height.value : this.height, + durationInSeconds: durationInSeconds.present + ? durationInSeconds.value + : this.durationInSeconds, + id: id ?? this.id, + checksum: checksum ?? this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + ownerId: ownerId ?? this.ownerId, + localDateTime: localDateTime.present + ? localDateTime.value + : this.localDateTime, + thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, + deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, + livePhotoVideoId: livePhotoVideoId.present + ? livePhotoVideoId.value + : this.livePhotoVideoId, + visibility: visibility ?? this.visibility, + stackId: stackId.present ? stackId.value : this.stackId, + libraryId: libraryId.present ? libraryId.value : this.libraryId, + ); + RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { + return RemoteAssetEntityData( + name: data.name.present ? data.name.value : this.name, + type: data.type.present ? data.type.value : this.type, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + width: data.width.present ? data.width.value : this.width, + height: data.height.present ? data.height.value : this.height, + durationInSeconds: data.durationInSeconds.present + ? data.durationInSeconds.value + : this.durationInSeconds, + id: data.id.present ? data.id.value : this.id, + checksum: data.checksum.present ? data.checksum.value : this.checksum, + isFavorite: data.isFavorite.present + ? data.isFavorite.value + : this.isFavorite, + ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, + localDateTime: data.localDateTime.present + ? data.localDateTime.value + : this.localDateTime, + thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, + deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, + livePhotoVideoId: data.livePhotoVideoId.present + ? data.livePhotoVideoId.value + : this.livePhotoVideoId, + visibility: data.visibility.present + ? data.visibility.value + : this.visibility, + stackId: data.stackId.present ? data.stackId.value : this.stackId, + libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId, + ); + } + + @override + String toString() { + return (StringBuffer('RemoteAssetEntityData(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('ownerId: $ownerId, ') + ..write('localDateTime: $localDateTime, ') + ..write('thumbHash: $thumbHash, ') + ..write('deletedAt: $deletedAt, ') + ..write('livePhotoVideoId: $livePhotoVideoId, ') + ..write('visibility: $visibility, ') + ..write('stackId: $stackId, ') + ..write('libraryId: $libraryId') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + checksum, + isFavorite, + ownerId, + localDateTime, + thumbHash, + deletedAt, + livePhotoVideoId, + visibility, + stackId, + libraryId, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is RemoteAssetEntityData && + other.name == this.name && + other.type == this.type && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.width == this.width && + other.height == this.height && + other.durationInSeconds == this.durationInSeconds && + other.id == this.id && + other.checksum == this.checksum && + other.isFavorite == this.isFavorite && + other.ownerId == this.ownerId && + other.localDateTime == this.localDateTime && + other.thumbHash == this.thumbHash && + other.deletedAt == this.deletedAt && + other.livePhotoVideoId == this.livePhotoVideoId && + other.visibility == this.visibility && + other.stackId == this.stackId && + other.libraryId == this.libraryId); +} + +class RemoteAssetEntityCompanion + extends UpdateCompanion { + final Value name; + final Value type; + final Value createdAt; + final Value updatedAt; + final Value width; + final Value height; + final Value durationInSeconds; + final Value id; + final Value checksum; + final Value isFavorite; + final Value ownerId; + final Value localDateTime; + final Value thumbHash; + final Value deletedAt; + final Value livePhotoVideoId; + final Value visibility; + final Value stackId; + final Value libraryId; + const RemoteAssetEntityCompanion({ + this.name = const Value.absent(), + this.type = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.width = const Value.absent(), + this.height = const Value.absent(), + this.durationInSeconds = const Value.absent(), + this.id = const Value.absent(), + this.checksum = const Value.absent(), + this.isFavorite = const Value.absent(), + this.ownerId = const Value.absent(), + this.localDateTime = const Value.absent(), + this.thumbHash = const Value.absent(), + this.deletedAt = const Value.absent(), + this.livePhotoVideoId = const Value.absent(), + this.visibility = const Value.absent(), + this.stackId = const Value.absent(), + this.libraryId = const Value.absent(), + }); + RemoteAssetEntityCompanion.insert({ + required String name, + required int type, + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.width = const Value.absent(), + this.height = const Value.absent(), + this.durationInSeconds = const Value.absent(), + required String id, + required String checksum, + this.isFavorite = const Value.absent(), + required String ownerId, + this.localDateTime = const Value.absent(), + this.thumbHash = const Value.absent(), + this.deletedAt = const Value.absent(), + this.livePhotoVideoId = const Value.absent(), + required int visibility, + this.stackId = const Value.absent(), + this.libraryId = const Value.absent(), + }) : name = Value(name), + type = Value(type), + id = Value(id), + checksum = Value(checksum), + ownerId = Value(ownerId), + visibility = Value(visibility); + static Insertable custom({ + Expression? name, + Expression? type, + Expression? createdAt, + Expression? updatedAt, + Expression? width, + Expression? height, + Expression? durationInSeconds, + Expression? id, + Expression? checksum, + Expression? isFavorite, + Expression? ownerId, + Expression? localDateTime, + Expression? thumbHash, + Expression? deletedAt, + Expression? livePhotoVideoId, + Expression? visibility, + Expression? stackId, + Expression? libraryId, + }) { + return RawValuesInsertable({ + if (name != null) 'name': name, + if (type != null) 'type': type, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (width != null) 'width': width, + if (height != null) 'height': height, + if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, + if (id != null) 'id': id, + if (checksum != null) 'checksum': checksum, + if (isFavorite != null) 'is_favorite': isFavorite, + if (ownerId != null) 'owner_id': ownerId, + if (localDateTime != null) 'local_date_time': localDateTime, + if (thumbHash != null) 'thumb_hash': thumbHash, + if (deletedAt != null) 'deleted_at': deletedAt, + if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, + if (visibility != null) 'visibility': visibility, + if (stackId != null) 'stack_id': stackId, + if (libraryId != null) 'library_id': libraryId, + }); + } + + RemoteAssetEntityCompanion copyWith({ + Value? name, + Value? type, + Value? createdAt, + Value? updatedAt, + Value? width, + Value? height, + Value? durationInSeconds, + Value? id, + Value? checksum, + Value? isFavorite, + Value? ownerId, + Value? localDateTime, + Value? thumbHash, + Value? deletedAt, + Value? livePhotoVideoId, + Value? visibility, + Value? stackId, + Value? libraryId, + }) { + return RemoteAssetEntityCompanion( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width ?? this.width, + height: height ?? this.height, + durationInSeconds: durationInSeconds ?? this.durationInSeconds, + id: id ?? this.id, + checksum: checksum ?? this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + ownerId: ownerId ?? this.ownerId, + localDateTime: localDateTime ?? this.localDateTime, + thumbHash: thumbHash ?? this.thumbHash, + deletedAt: deletedAt ?? this.deletedAt, + livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, + visibility: visibility ?? this.visibility, + stackId: stackId ?? this.stackId, + libraryId: libraryId ?? this.libraryId, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (name.present) { + map['name'] = Variable(name.value); + } + if (type.present) { + map['type'] = Variable(type.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (width.present) { + map['width'] = Variable(width.value); + } + if (height.present) { + map['height'] = Variable(height.value); + } + if (durationInSeconds.present) { + map['duration_in_seconds'] = Variable(durationInSeconds.value); + } + if (id.present) { + map['id'] = Variable(id.value); + } + if (checksum.present) { + map['checksum'] = Variable(checksum.value); + } + if (isFavorite.present) { + map['is_favorite'] = Variable(isFavorite.value); + } + if (ownerId.present) { + map['owner_id'] = Variable(ownerId.value); + } + if (localDateTime.present) { + map['local_date_time'] = Variable(localDateTime.value); + } + if (thumbHash.present) { + map['thumb_hash'] = Variable(thumbHash.value); + } + if (deletedAt.present) { + map['deleted_at'] = Variable(deletedAt.value); + } + if (livePhotoVideoId.present) { + map['live_photo_video_id'] = Variable(livePhotoVideoId.value); + } + if (visibility.present) { + map['visibility'] = Variable(visibility.value); + } + if (stackId.present) { + map['stack_id'] = Variable(stackId.value); + } + if (libraryId.present) { + map['library_id'] = Variable(libraryId.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('RemoteAssetEntityCompanion(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('ownerId: $ownerId, ') + ..write('localDateTime: $localDateTime, ') + ..write('thumbHash: $thumbHash, ') + ..write('deletedAt: $deletedAt, ') + ..write('livePhotoVideoId: $livePhotoVideoId, ') + ..write('visibility: $visibility, ') + ..write('stackId: $stackId, ') + ..write('libraryId: $libraryId') + ..write(')')) + .toString(); + } +} + +class StackEntity extends Table with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + StackEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn ownerId = GeneratedColumn( + 'owner_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn primaryAssetId = GeneratedColumn( + 'primary_asset_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + @override + List get $columns => [ + id, + createdAt, + updatedAt, + ownerId, + primaryAssetId, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'stack_entity'; + @override + Set get $primaryKey => {id}; + @override + StackEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return StackEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + ownerId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}owner_id'], + )!, + primaryAssetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}primary_asset_id'], + )!, + ); + } + + @override + StackEntity createAlias(String alias) { + return StackEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class StackEntityData extends DataClass implements Insertable { + final String id; + final DateTime createdAt; + final DateTime updatedAt; + final String ownerId; + final String primaryAssetId; + const StackEntityData({ + required this.id, + required this.createdAt, + required this.updatedAt, + required this.ownerId, + required this.primaryAssetId, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + map['owner_id'] = Variable(ownerId); + map['primary_asset_id'] = Variable(primaryAssetId); + return map; + } + + factory StackEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return StackEntityData( + id: serializer.fromJson(json['id']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + ownerId: serializer.fromJson(json['ownerId']), + primaryAssetId: serializer.fromJson(json['primaryAssetId']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'ownerId': serializer.toJson(ownerId), + 'primaryAssetId': serializer.toJson(primaryAssetId), + }; + } + + StackEntityData copyWith({ + String? id, + DateTime? createdAt, + DateTime? updatedAt, + String? ownerId, + String? primaryAssetId, + }) => StackEntityData( + id: id ?? this.id, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ownerId: ownerId ?? this.ownerId, + primaryAssetId: primaryAssetId ?? this.primaryAssetId, + ); + StackEntityData copyWithCompanion(StackEntityCompanion data) { + return StackEntityData( + id: data.id.present ? data.id.value : this.id, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, + primaryAssetId: data.primaryAssetId.present + ? data.primaryAssetId.value + : this.primaryAssetId, + ); + } + + @override + String toString() { + return (StringBuffer('StackEntityData(') + ..write('id: $id, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('ownerId: $ownerId, ') + ..write('primaryAssetId: $primaryAssetId') + ..write(')')) + .toString(); + } + + @override + int get hashCode => + Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is StackEntityData && + other.id == this.id && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.ownerId == this.ownerId && + other.primaryAssetId == this.primaryAssetId); +} + +class StackEntityCompanion extends UpdateCompanion { + final Value id; + final Value createdAt; + final Value updatedAt; + final Value ownerId; + final Value primaryAssetId; + const StackEntityCompanion({ + this.id = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.ownerId = const Value.absent(), + this.primaryAssetId = const Value.absent(), + }); + StackEntityCompanion.insert({ + required String id, + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + required String ownerId, + required String primaryAssetId, + }) : id = Value(id), + ownerId = Value(ownerId), + primaryAssetId = Value(primaryAssetId); + static Insertable custom({ + Expression? id, + Expression? createdAt, + Expression? updatedAt, + Expression? ownerId, + Expression? primaryAssetId, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (ownerId != null) 'owner_id': ownerId, + if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, + }); + } + + StackEntityCompanion copyWith({ + Value? id, + Value? createdAt, + Value? updatedAt, + Value? ownerId, + Value? primaryAssetId, + }) { + return StackEntityCompanion( + id: id ?? this.id, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ownerId: ownerId ?? this.ownerId, + primaryAssetId: primaryAssetId ?? this.primaryAssetId, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (ownerId.present) { + map['owner_id'] = Variable(ownerId.value); + } + if (primaryAssetId.present) { + map['primary_asset_id'] = Variable(primaryAssetId.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('StackEntityCompanion(') + ..write('id: $id, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('ownerId: $ownerId, ') + ..write('primaryAssetId: $primaryAssetId') + ..write(')')) + .toString(); + } +} + +class LocalAssetEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + LocalAssetEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn type = GeneratedColumn( + 'type', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn width = GeneratedColumn( + 'width', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn height = GeneratedColumn( + 'height', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn durationInSeconds = GeneratedColumn( + 'duration_in_seconds', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn checksum = GeneratedColumn( + 'checksum', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn isFavorite = GeneratedColumn( + 'is_favorite', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_favorite" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn orientation = GeneratedColumn( + 'orientation', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: false, + defaultValue: const CustomExpression('0'), + ); + @override + List get $columns => [ + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + checksum, + isFavorite, + orientation, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'local_asset_entity'; + @override + Set get $primaryKey => {id}; + @override + LocalAssetEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return LocalAssetEntityData( + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + type: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}type'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + width: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}width'], + ), + height: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}height'], + ), + durationInSeconds: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}duration_in_seconds'], + ), + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + checksum: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}checksum'], + ), + isFavorite: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_favorite'], + )!, + orientation: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}orientation'], + )!, + ); + } + + @override + LocalAssetEntity createAlias(String alias) { + return LocalAssetEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class LocalAssetEntityData extends DataClass + implements Insertable { + final String name; + final int type; + final DateTime createdAt; + final DateTime updatedAt; + final int? width; + final int? height; + final int? durationInSeconds; + final String id; + final String? checksum; + final bool isFavorite; + final int orientation; + const LocalAssetEntityData({ + required this.name, + required this.type, + required this.createdAt, + required this.updatedAt, + this.width, + this.height, + this.durationInSeconds, + required this.id, + this.checksum, + required this.isFavorite, + required this.orientation, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['name'] = Variable(name); + map['type'] = Variable(type); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + if (!nullToAbsent || width != null) { + map['width'] = Variable(width); + } + if (!nullToAbsent || height != null) { + map['height'] = Variable(height); + } + if (!nullToAbsent || durationInSeconds != null) { + map['duration_in_seconds'] = Variable(durationInSeconds); + } + map['id'] = Variable(id); + if (!nullToAbsent || checksum != null) { + map['checksum'] = Variable(checksum); + } + map['is_favorite'] = Variable(isFavorite); + map['orientation'] = Variable(orientation); + return map; + } + + factory LocalAssetEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return LocalAssetEntityData( + name: serializer.fromJson(json['name']), + type: serializer.fromJson(json['type']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + width: serializer.fromJson(json['width']), + height: serializer.fromJson(json['height']), + durationInSeconds: serializer.fromJson(json['durationInSeconds']), + id: serializer.fromJson(json['id']), + checksum: serializer.fromJson(json['checksum']), + isFavorite: serializer.fromJson(json['isFavorite']), + orientation: serializer.fromJson(json['orientation']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'name': serializer.toJson(name), + 'type': serializer.toJson(type), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'width': serializer.toJson(width), + 'height': serializer.toJson(height), + 'durationInSeconds': serializer.toJson(durationInSeconds), + 'id': serializer.toJson(id), + 'checksum': serializer.toJson(checksum), + 'isFavorite': serializer.toJson(isFavorite), + 'orientation': serializer.toJson(orientation), + }; + } + + LocalAssetEntityData copyWith({ + String? name, + int? type, + DateTime? createdAt, + DateTime? updatedAt, + Value width = const Value.absent(), + Value height = const Value.absent(), + Value durationInSeconds = const Value.absent(), + String? id, + Value checksum = const Value.absent(), + bool? isFavorite, + int? orientation, + }) => LocalAssetEntityData( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width.present ? width.value : this.width, + height: height.present ? height.value : this.height, + durationInSeconds: durationInSeconds.present + ? durationInSeconds.value + : this.durationInSeconds, + id: id ?? this.id, + checksum: checksum.present ? checksum.value : this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + orientation: orientation ?? this.orientation, + ); + LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { + return LocalAssetEntityData( + name: data.name.present ? data.name.value : this.name, + type: data.type.present ? data.type.value : this.type, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + width: data.width.present ? data.width.value : this.width, + height: data.height.present ? data.height.value : this.height, + durationInSeconds: data.durationInSeconds.present + ? data.durationInSeconds.value + : this.durationInSeconds, + id: data.id.present ? data.id.value : this.id, + checksum: data.checksum.present ? data.checksum.value : this.checksum, + isFavorite: data.isFavorite.present + ? data.isFavorite.value + : this.isFavorite, + orientation: data.orientation.present + ? data.orientation.value + : this.orientation, + ); + } + + @override + String toString() { + return (StringBuffer('LocalAssetEntityData(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('orientation: $orientation') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + checksum, + isFavorite, + orientation, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is LocalAssetEntityData && + other.name == this.name && + other.type == this.type && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.width == this.width && + other.height == this.height && + other.durationInSeconds == this.durationInSeconds && + other.id == this.id && + other.checksum == this.checksum && + other.isFavorite == this.isFavorite && + other.orientation == this.orientation); +} + +class LocalAssetEntityCompanion extends UpdateCompanion { + final Value name; + final Value type; + final Value createdAt; + final Value updatedAt; + final Value width; + final Value height; + final Value durationInSeconds; + final Value id; + final Value checksum; + final Value isFavorite; + final Value orientation; + const LocalAssetEntityCompanion({ + this.name = const Value.absent(), + this.type = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.width = const Value.absent(), + this.height = const Value.absent(), + this.durationInSeconds = const Value.absent(), + this.id = const Value.absent(), + this.checksum = const Value.absent(), + this.isFavorite = const Value.absent(), + this.orientation = const Value.absent(), + }); + LocalAssetEntityCompanion.insert({ + required String name, + required int type, + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.width = const Value.absent(), + this.height = const Value.absent(), + this.durationInSeconds = const Value.absent(), + required String id, + this.checksum = const Value.absent(), + this.isFavorite = const Value.absent(), + this.orientation = const Value.absent(), + }) : name = Value(name), + type = Value(type), + id = Value(id); + static Insertable custom({ + Expression? name, + Expression? type, + Expression? createdAt, + Expression? updatedAt, + Expression? width, + Expression? height, + Expression? durationInSeconds, + Expression? id, + Expression? checksum, + Expression? isFavorite, + Expression? orientation, + }) { + return RawValuesInsertable({ + if (name != null) 'name': name, + if (type != null) 'type': type, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (width != null) 'width': width, + if (height != null) 'height': height, + if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, + if (id != null) 'id': id, + if (checksum != null) 'checksum': checksum, + if (isFavorite != null) 'is_favorite': isFavorite, + if (orientation != null) 'orientation': orientation, + }); + } + + LocalAssetEntityCompanion copyWith({ + Value? name, + Value? type, + Value? createdAt, + Value? updatedAt, + Value? width, + Value? height, + Value? durationInSeconds, + Value? id, + Value? checksum, + Value? isFavorite, + Value? orientation, + }) { + return LocalAssetEntityCompanion( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width ?? this.width, + height: height ?? this.height, + durationInSeconds: durationInSeconds ?? this.durationInSeconds, + id: id ?? this.id, + checksum: checksum ?? this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + orientation: orientation ?? this.orientation, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (name.present) { + map['name'] = Variable(name.value); + } + if (type.present) { + map['type'] = Variable(type.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (width.present) { + map['width'] = Variable(width.value); + } + if (height.present) { + map['height'] = Variable(height.value); + } + if (durationInSeconds.present) { + map['duration_in_seconds'] = Variable(durationInSeconds.value); + } + if (id.present) { + map['id'] = Variable(id.value); + } + if (checksum.present) { + map['checksum'] = Variable(checksum.value); + } + if (isFavorite.present) { + map['is_favorite'] = Variable(isFavorite.value); + } + if (orientation.present) { + map['orientation'] = Variable(orientation.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('LocalAssetEntityCompanion(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('orientation: $orientation') + ..write(')')) + .toString(); + } +} + +class RemoteAlbumEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + RemoteAlbumEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn description = GeneratedColumn( + 'description', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: false, + defaultValue: const CustomExpression('\'\''), + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn ownerId = GeneratedColumn( + 'owner_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn thumbnailAssetId = GeneratedColumn( + 'thumbnail_asset_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_asset_entity (id) ON DELETE SET NULL', + ), + ); + late final GeneratedColumn isActivityEnabled = GeneratedColumn( + 'is_activity_enabled', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_activity_enabled" IN (0, 1))', + ), + defaultValue: const CustomExpression('1'), + ); + late final GeneratedColumn order = GeneratedColumn( + 'order', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + @override + List get $columns => [ + id, + name, + description, + createdAt, + updatedAt, + ownerId, + thumbnailAssetId, + isActivityEnabled, + order, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'remote_album_entity'; + @override + Set get $primaryKey => {id}; + @override + RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return RemoteAlbumEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + description: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}description'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + ownerId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}owner_id'], + )!, + thumbnailAssetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}thumbnail_asset_id'], + ), + isActivityEnabled: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_activity_enabled'], + )!, + order: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}order'], + )!, + ); + } + + @override + RemoteAlbumEntity createAlias(String alias) { + return RemoteAlbumEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class RemoteAlbumEntityData extends DataClass + implements Insertable { + final String id; + final String name; + final String description; + final DateTime createdAt; + final DateTime updatedAt; + final String ownerId; + final String? thumbnailAssetId; + final bool isActivityEnabled; + final int order; + const RemoteAlbumEntityData({ + required this.id, + required this.name, + required this.description, + required this.createdAt, + required this.updatedAt, + required this.ownerId, + this.thumbnailAssetId, + required this.isActivityEnabled, + required this.order, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['name'] = Variable(name); + map['description'] = Variable(description); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + map['owner_id'] = Variable(ownerId); + if (!nullToAbsent || thumbnailAssetId != null) { + map['thumbnail_asset_id'] = Variable(thumbnailAssetId); + } + map['is_activity_enabled'] = Variable(isActivityEnabled); + map['order'] = Variable(order); + return map; + } + + factory RemoteAlbumEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return RemoteAlbumEntityData( + id: serializer.fromJson(json['id']), + name: serializer.fromJson(json['name']), + description: serializer.fromJson(json['description']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + ownerId: serializer.fromJson(json['ownerId']), + thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), + isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), + order: serializer.fromJson(json['order']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'name': serializer.toJson(name), + 'description': serializer.toJson(description), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'ownerId': serializer.toJson(ownerId), + 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), + 'isActivityEnabled': serializer.toJson(isActivityEnabled), + 'order': serializer.toJson(order), + }; + } + + RemoteAlbumEntityData copyWith({ + String? id, + String? name, + String? description, + DateTime? createdAt, + DateTime? updatedAt, + String? ownerId, + Value thumbnailAssetId = const Value.absent(), + bool? isActivityEnabled, + int? order, + }) => RemoteAlbumEntityData( + id: id ?? this.id, + name: name ?? this.name, + description: description ?? this.description, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ownerId: ownerId ?? this.ownerId, + thumbnailAssetId: thumbnailAssetId.present + ? thumbnailAssetId.value + : this.thumbnailAssetId, + isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, + order: order ?? this.order, + ); + RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { + return RemoteAlbumEntityData( + id: data.id.present ? data.id.value : this.id, + name: data.name.present ? data.name.value : this.name, + description: data.description.present + ? data.description.value + : this.description, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, + thumbnailAssetId: data.thumbnailAssetId.present + ? data.thumbnailAssetId.value + : this.thumbnailAssetId, + isActivityEnabled: data.isActivityEnabled.present + ? data.isActivityEnabled.value + : this.isActivityEnabled, + order: data.order.present ? data.order.value : this.order, + ); + } + + @override + String toString() { + return (StringBuffer('RemoteAlbumEntityData(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('description: $description, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('ownerId: $ownerId, ') + ..write('thumbnailAssetId: $thumbnailAssetId, ') + ..write('isActivityEnabled: $isActivityEnabled, ') + ..write('order: $order') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + name, + description, + createdAt, + updatedAt, + ownerId, + thumbnailAssetId, + isActivityEnabled, + order, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is RemoteAlbumEntityData && + other.id == this.id && + other.name == this.name && + other.description == this.description && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.ownerId == this.ownerId && + other.thumbnailAssetId == this.thumbnailAssetId && + other.isActivityEnabled == this.isActivityEnabled && + other.order == this.order); +} + +class RemoteAlbumEntityCompanion + extends UpdateCompanion { + final Value id; + final Value name; + final Value description; + final Value createdAt; + final Value updatedAt; + final Value ownerId; + final Value thumbnailAssetId; + final Value isActivityEnabled; + final Value order; + const RemoteAlbumEntityCompanion({ + this.id = const Value.absent(), + this.name = const Value.absent(), + this.description = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.ownerId = const Value.absent(), + this.thumbnailAssetId = const Value.absent(), + this.isActivityEnabled = const Value.absent(), + this.order = const Value.absent(), + }); + RemoteAlbumEntityCompanion.insert({ + required String id, + required String name, + this.description = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + required String ownerId, + this.thumbnailAssetId = const Value.absent(), + this.isActivityEnabled = const Value.absent(), + required int order, + }) : id = Value(id), + name = Value(name), + ownerId = Value(ownerId), + order = Value(order); + static Insertable custom({ + Expression? id, + Expression? name, + Expression? description, + Expression? createdAt, + Expression? updatedAt, + Expression? ownerId, + Expression? thumbnailAssetId, + Expression? isActivityEnabled, + Expression? order, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (name != null) 'name': name, + if (description != null) 'description': description, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (ownerId != null) 'owner_id': ownerId, + if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, + if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, + if (order != null) 'order': order, + }); + } + + RemoteAlbumEntityCompanion copyWith({ + Value? id, + Value? name, + Value? description, + Value? createdAt, + Value? updatedAt, + Value? ownerId, + Value? thumbnailAssetId, + Value? isActivityEnabled, + Value? order, + }) { + return RemoteAlbumEntityCompanion( + id: id ?? this.id, + name: name ?? this.name, + description: description ?? this.description, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ownerId: ownerId ?? this.ownerId, + thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, + isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, + order: order ?? this.order, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (name.present) { + map['name'] = Variable(name.value); + } + if (description.present) { + map['description'] = Variable(description.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (ownerId.present) { + map['owner_id'] = Variable(ownerId.value); + } + if (thumbnailAssetId.present) { + map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); + } + if (isActivityEnabled.present) { + map['is_activity_enabled'] = Variable(isActivityEnabled.value); + } + if (order.present) { + map['order'] = Variable(order.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('RemoteAlbumEntityCompanion(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('description: $description, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('ownerId: $ownerId, ') + ..write('thumbnailAssetId: $thumbnailAssetId, ') + ..write('isActivityEnabled: $isActivityEnabled, ') + ..write('order: $order') + ..write(')')) + .toString(); + } +} + +class LocalAlbumEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + LocalAlbumEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn backupSelection = GeneratedColumn( + 'backup_selection', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn isIosSharedAlbum = GeneratedColumn( + 'is_ios_shared_album', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_ios_shared_album" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn linkedRemoteAlbumId = + GeneratedColumn( + 'linked_remote_album_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_album_entity (id) ON DELETE SET NULL', + ), + ); + late final GeneratedColumn marker_ = GeneratedColumn( + 'marker', + aliasedName, + true, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("marker" IN (0, 1))', + ), + ); + @override + List get $columns => [ + id, + name, + updatedAt, + backupSelection, + isIosSharedAlbum, + linkedRemoteAlbumId, + marker_, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'local_album_entity'; + @override + Set get $primaryKey => {id}; + @override + LocalAlbumEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return LocalAlbumEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + backupSelection: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}backup_selection'], + )!, + isIosSharedAlbum: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_ios_shared_album'], + )!, + linkedRemoteAlbumId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}linked_remote_album_id'], + ), + marker_: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}marker'], + ), + ); + } + + @override + LocalAlbumEntity createAlias(String alias) { + return LocalAlbumEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class LocalAlbumEntityData extends DataClass + implements Insertable { + final String id; + final String name; + final DateTime updatedAt; + final int backupSelection; + final bool isIosSharedAlbum; + final String? linkedRemoteAlbumId; + final bool? marker_; + const LocalAlbumEntityData({ + required this.id, + required this.name, + required this.updatedAt, + required this.backupSelection, + required this.isIosSharedAlbum, + this.linkedRemoteAlbumId, + this.marker_, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['name'] = Variable(name); + map['updated_at'] = Variable(updatedAt); + map['backup_selection'] = Variable(backupSelection); + map['is_ios_shared_album'] = Variable(isIosSharedAlbum); + if (!nullToAbsent || linkedRemoteAlbumId != null) { + map['linked_remote_album_id'] = Variable(linkedRemoteAlbumId); + } + if (!nullToAbsent || marker_ != null) { + map['marker'] = Variable(marker_); + } + return map; + } + + factory LocalAlbumEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return LocalAlbumEntityData( + id: serializer.fromJson(json['id']), + name: serializer.fromJson(json['name']), + updatedAt: serializer.fromJson(json['updatedAt']), + backupSelection: serializer.fromJson(json['backupSelection']), + isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), + linkedRemoteAlbumId: serializer.fromJson( + json['linkedRemoteAlbumId'], + ), + marker_: serializer.fromJson(json['marker_']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'name': serializer.toJson(name), + 'updatedAt': serializer.toJson(updatedAt), + 'backupSelection': serializer.toJson(backupSelection), + 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), + 'linkedRemoteAlbumId': serializer.toJson(linkedRemoteAlbumId), + 'marker_': serializer.toJson(marker_), + }; + } + + LocalAlbumEntityData copyWith({ + String? id, + String? name, + DateTime? updatedAt, + int? backupSelection, + bool? isIosSharedAlbum, + Value linkedRemoteAlbumId = const Value.absent(), + Value marker_ = const Value.absent(), + }) => LocalAlbumEntityData( + id: id ?? this.id, + name: name ?? this.name, + updatedAt: updatedAt ?? this.updatedAt, + backupSelection: backupSelection ?? this.backupSelection, + isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, + linkedRemoteAlbumId: linkedRemoteAlbumId.present + ? linkedRemoteAlbumId.value + : this.linkedRemoteAlbumId, + marker_: marker_.present ? marker_.value : this.marker_, + ); + LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { + return LocalAlbumEntityData( + id: data.id.present ? data.id.value : this.id, + name: data.name.present ? data.name.value : this.name, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + backupSelection: data.backupSelection.present + ? data.backupSelection.value + : this.backupSelection, + isIosSharedAlbum: data.isIosSharedAlbum.present + ? data.isIosSharedAlbum.value + : this.isIosSharedAlbum, + linkedRemoteAlbumId: data.linkedRemoteAlbumId.present + ? data.linkedRemoteAlbumId.value + : this.linkedRemoteAlbumId, + marker_: data.marker_.present ? data.marker_.value : this.marker_, + ); + } + + @override + String toString() { + return (StringBuffer('LocalAlbumEntityData(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('updatedAt: $updatedAt, ') + ..write('backupSelection: $backupSelection, ') + ..write('isIosSharedAlbum: $isIosSharedAlbum, ') + ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') + ..write('marker_: $marker_') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + name, + updatedAt, + backupSelection, + isIosSharedAlbum, + linkedRemoteAlbumId, + marker_, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is LocalAlbumEntityData && + other.id == this.id && + other.name == this.name && + other.updatedAt == this.updatedAt && + other.backupSelection == this.backupSelection && + other.isIosSharedAlbum == this.isIosSharedAlbum && + other.linkedRemoteAlbumId == this.linkedRemoteAlbumId && + other.marker_ == this.marker_); +} + +class LocalAlbumEntityCompanion extends UpdateCompanion { + final Value id; + final Value name; + final Value updatedAt; + final Value backupSelection; + final Value isIosSharedAlbum; + final Value linkedRemoteAlbumId; + final Value marker_; + const LocalAlbumEntityCompanion({ + this.id = const Value.absent(), + this.name = const Value.absent(), + this.updatedAt = const Value.absent(), + this.backupSelection = const Value.absent(), + this.isIosSharedAlbum = const Value.absent(), + this.linkedRemoteAlbumId = const Value.absent(), + this.marker_ = const Value.absent(), + }); + LocalAlbumEntityCompanion.insert({ + required String id, + required String name, + this.updatedAt = const Value.absent(), + required int backupSelection, + this.isIosSharedAlbum = const Value.absent(), + this.linkedRemoteAlbumId = const Value.absent(), + this.marker_ = const Value.absent(), + }) : id = Value(id), + name = Value(name), + backupSelection = Value(backupSelection); + static Insertable custom({ + Expression? id, + Expression? name, + Expression? updatedAt, + Expression? backupSelection, + Expression? isIosSharedAlbum, + Expression? linkedRemoteAlbumId, + Expression? marker_, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (name != null) 'name': name, + if (updatedAt != null) 'updated_at': updatedAt, + if (backupSelection != null) 'backup_selection': backupSelection, + if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, + if (linkedRemoteAlbumId != null) + 'linked_remote_album_id': linkedRemoteAlbumId, + if (marker_ != null) 'marker': marker_, + }); + } + + LocalAlbumEntityCompanion copyWith({ + Value? id, + Value? name, + Value? updatedAt, + Value? backupSelection, + Value? isIosSharedAlbum, + Value? linkedRemoteAlbumId, + Value? marker_, + }) { + return LocalAlbumEntityCompanion( + id: id ?? this.id, + name: name ?? this.name, + updatedAt: updatedAt ?? this.updatedAt, + backupSelection: backupSelection ?? this.backupSelection, + isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, + linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId, + marker_: marker_ ?? this.marker_, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (name.present) { + map['name'] = Variable(name.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (backupSelection.present) { + map['backup_selection'] = Variable(backupSelection.value); + } + if (isIosSharedAlbum.present) { + map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); + } + if (linkedRemoteAlbumId.present) { + map['linked_remote_album_id'] = Variable( + linkedRemoteAlbumId.value, + ); + } + if (marker_.present) { + map['marker'] = Variable(marker_.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('LocalAlbumEntityCompanion(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('updatedAt: $updatedAt, ') + ..write('backupSelection: $backupSelection, ') + ..write('isIosSharedAlbum: $isIosSharedAlbum, ') + ..write('linkedRemoteAlbumId: $linkedRemoteAlbumId, ') + ..write('marker_: $marker_') + ..write(')')) + .toString(); + } +} + +class LocalAlbumAssetEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn assetId = GeneratedColumn( + 'asset_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES local_asset_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn albumId = GeneratedColumn( + 'album_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES local_album_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn marker_ = GeneratedColumn( + 'marker', + aliasedName, + true, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("marker" IN (0, 1))', + ), + ); + @override + List get $columns => [assetId, albumId, marker_]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'local_album_asset_entity'; + @override + Set get $primaryKey => {assetId, albumId}; + @override + LocalAlbumAssetEntityData map( + Map data, { + String? tablePrefix, + }) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return LocalAlbumAssetEntityData( + assetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}asset_id'], + )!, + albumId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}album_id'], + )!, + marker_: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}marker'], + ), + ); + } + + @override + LocalAlbumAssetEntity createAlias(String alias) { + return LocalAlbumAssetEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class LocalAlbumAssetEntityData extends DataClass + implements Insertable { + final String assetId; + final String albumId; + final bool? marker_; + const LocalAlbumAssetEntityData({ + required this.assetId, + required this.albumId, + this.marker_, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['asset_id'] = Variable(assetId); + map['album_id'] = Variable(albumId); + if (!nullToAbsent || marker_ != null) { + map['marker'] = Variable(marker_); + } + return map; + } + + factory LocalAlbumAssetEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return LocalAlbumAssetEntityData( + assetId: serializer.fromJson(json['assetId']), + albumId: serializer.fromJson(json['albumId']), + marker_: serializer.fromJson(json['marker_']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'assetId': serializer.toJson(assetId), + 'albumId': serializer.toJson(albumId), + 'marker_': serializer.toJson(marker_), + }; + } + + LocalAlbumAssetEntityData copyWith({ + String? assetId, + String? albumId, + Value marker_ = const Value.absent(), + }) => LocalAlbumAssetEntityData( + assetId: assetId ?? this.assetId, + albumId: albumId ?? this.albumId, + marker_: marker_.present ? marker_.value : this.marker_, + ); + LocalAlbumAssetEntityData copyWithCompanion( + LocalAlbumAssetEntityCompanion data, + ) { + return LocalAlbumAssetEntityData( + assetId: data.assetId.present ? data.assetId.value : this.assetId, + albumId: data.albumId.present ? data.albumId.value : this.albumId, + marker_: data.marker_.present ? data.marker_.value : this.marker_, + ); + } + + @override + String toString() { + return (StringBuffer('LocalAlbumAssetEntityData(') + ..write('assetId: $assetId, ') + ..write('albumId: $albumId, ') + ..write('marker_: $marker_') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(assetId, albumId, marker_); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is LocalAlbumAssetEntityData && + other.assetId == this.assetId && + other.albumId == this.albumId && + other.marker_ == this.marker_); +} + +class LocalAlbumAssetEntityCompanion + extends UpdateCompanion { + final Value assetId; + final Value albumId; + final Value marker_; + const LocalAlbumAssetEntityCompanion({ + this.assetId = const Value.absent(), + this.albumId = const Value.absent(), + this.marker_ = const Value.absent(), + }); + LocalAlbumAssetEntityCompanion.insert({ + required String assetId, + required String albumId, + this.marker_ = const Value.absent(), + }) : assetId = Value(assetId), + albumId = Value(albumId); + static Insertable custom({ + Expression? assetId, + Expression? albumId, + Expression? marker_, + }) { + return RawValuesInsertable({ + if (assetId != null) 'asset_id': assetId, + if (albumId != null) 'album_id': albumId, + if (marker_ != null) 'marker': marker_, + }); + } + + LocalAlbumAssetEntityCompanion copyWith({ + Value? assetId, + Value? albumId, + Value? marker_, + }) { + return LocalAlbumAssetEntityCompanion( + assetId: assetId ?? this.assetId, + albumId: albumId ?? this.albumId, + marker_: marker_ ?? this.marker_, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (assetId.present) { + map['asset_id'] = Variable(assetId.value); + } + if (albumId.present) { + map['album_id'] = Variable(albumId.value); + } + if (marker_.present) { + map['marker'] = Variable(marker_.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('LocalAlbumAssetEntityCompanion(') + ..write('assetId: $assetId, ') + ..write('albumId: $albumId, ') + ..write('marker_: $marker_') + ..write(')')) + .toString(); + } +} + +class AuthUserEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + AuthUserEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn email = GeneratedColumn( + 'email', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn isAdmin = GeneratedColumn( + 'is_admin', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_admin" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn hasProfileImage = GeneratedColumn( + 'has_profile_image', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("has_profile_image" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn profileChangedAt = + GeneratedColumn( + 'profile_changed_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn avatarColor = GeneratedColumn( + 'avatar_color', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn quotaSizeInBytes = GeneratedColumn( + 'quota_size_in_bytes', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: false, + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn quotaUsageInBytes = GeneratedColumn( + 'quota_usage_in_bytes', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: false, + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn pinCode = GeneratedColumn( + 'pin_code', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + @override + List get $columns => [ + id, + name, + email, + isAdmin, + hasProfileImage, + profileChangedAt, + avatarColor, + quotaSizeInBytes, + quotaUsageInBytes, + pinCode, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'auth_user_entity'; + @override + Set get $primaryKey => {id}; + @override + AuthUserEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return AuthUserEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + email: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}email'], + )!, + isAdmin: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_admin'], + )!, + hasProfileImage: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}has_profile_image'], + )!, + profileChangedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}profile_changed_at'], + )!, + avatarColor: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}avatar_color'], + )!, + quotaSizeInBytes: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}quota_size_in_bytes'], + )!, + quotaUsageInBytes: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}quota_usage_in_bytes'], + )!, + pinCode: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}pin_code'], + ), + ); + } + + @override + AuthUserEntity createAlias(String alias) { + return AuthUserEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class AuthUserEntityData extends DataClass + implements Insertable { + final String id; + final String name; + final String email; + final bool isAdmin; + final bool hasProfileImage; + final DateTime profileChangedAt; + final int avatarColor; + final int quotaSizeInBytes; + final int quotaUsageInBytes; + final String? pinCode; + const AuthUserEntityData({ + required this.id, + required this.name, + required this.email, + required this.isAdmin, + required this.hasProfileImage, + required this.profileChangedAt, + required this.avatarColor, + required this.quotaSizeInBytes, + required this.quotaUsageInBytes, + this.pinCode, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['name'] = Variable(name); + map['email'] = Variable(email); + map['is_admin'] = Variable(isAdmin); + map['has_profile_image'] = Variable(hasProfileImage); + map['profile_changed_at'] = Variable(profileChangedAt); + map['avatar_color'] = Variable(avatarColor); + map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); + map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); + if (!nullToAbsent || pinCode != null) { + map['pin_code'] = Variable(pinCode); + } + return map; + } + + factory AuthUserEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return AuthUserEntityData( + id: serializer.fromJson(json['id']), + name: serializer.fromJson(json['name']), + email: serializer.fromJson(json['email']), + isAdmin: serializer.fromJson(json['isAdmin']), + hasProfileImage: serializer.fromJson(json['hasProfileImage']), + profileChangedAt: serializer.fromJson(json['profileChangedAt']), + avatarColor: serializer.fromJson(json['avatarColor']), + quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), + quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), + pinCode: serializer.fromJson(json['pinCode']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'name': serializer.toJson(name), + 'email': serializer.toJson(email), + 'isAdmin': serializer.toJson(isAdmin), + 'hasProfileImage': serializer.toJson(hasProfileImage), + 'profileChangedAt': serializer.toJson(profileChangedAt), + 'avatarColor': serializer.toJson(avatarColor), + 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), + 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), + 'pinCode': serializer.toJson(pinCode), + }; + } + + AuthUserEntityData copyWith({ + String? id, + String? name, + String? email, + bool? isAdmin, + bool? hasProfileImage, + DateTime? profileChangedAt, + int? avatarColor, + int? quotaSizeInBytes, + int? quotaUsageInBytes, + Value pinCode = const Value.absent(), + }) => AuthUserEntityData( + id: id ?? this.id, + name: name ?? this.name, + email: email ?? this.email, + isAdmin: isAdmin ?? this.isAdmin, + hasProfileImage: hasProfileImage ?? this.hasProfileImage, + profileChangedAt: profileChangedAt ?? this.profileChangedAt, + avatarColor: avatarColor ?? this.avatarColor, + quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, + quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, + pinCode: pinCode.present ? pinCode.value : this.pinCode, + ); + AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) { + return AuthUserEntityData( + id: data.id.present ? data.id.value : this.id, + name: data.name.present ? data.name.value : this.name, + email: data.email.present ? data.email.value : this.email, + isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, + hasProfileImage: data.hasProfileImage.present + ? data.hasProfileImage.value + : this.hasProfileImage, + profileChangedAt: data.profileChangedAt.present + ? data.profileChangedAt.value + : this.profileChangedAt, + avatarColor: data.avatarColor.present + ? data.avatarColor.value + : this.avatarColor, + quotaSizeInBytes: data.quotaSizeInBytes.present + ? data.quotaSizeInBytes.value + : this.quotaSizeInBytes, + quotaUsageInBytes: data.quotaUsageInBytes.present + ? data.quotaUsageInBytes.value + : this.quotaUsageInBytes, + pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, + ); + } + + @override + String toString() { + return (StringBuffer('AuthUserEntityData(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('email: $email, ') + ..write('isAdmin: $isAdmin, ') + ..write('hasProfileImage: $hasProfileImage, ') + ..write('profileChangedAt: $profileChangedAt, ') + ..write('avatarColor: $avatarColor, ') + ..write('quotaSizeInBytes: $quotaSizeInBytes, ') + ..write('quotaUsageInBytes: $quotaUsageInBytes, ') + ..write('pinCode: $pinCode') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + name, + email, + isAdmin, + hasProfileImage, + profileChangedAt, + avatarColor, + quotaSizeInBytes, + quotaUsageInBytes, + pinCode, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is AuthUserEntityData && + other.id == this.id && + other.name == this.name && + other.email == this.email && + other.isAdmin == this.isAdmin && + other.hasProfileImage == this.hasProfileImage && + other.profileChangedAt == this.profileChangedAt && + other.avatarColor == this.avatarColor && + other.quotaSizeInBytes == this.quotaSizeInBytes && + other.quotaUsageInBytes == this.quotaUsageInBytes && + other.pinCode == this.pinCode); +} + +class AuthUserEntityCompanion extends UpdateCompanion { + final Value id; + final Value name; + final Value email; + final Value isAdmin; + final Value hasProfileImage; + final Value profileChangedAt; + final Value avatarColor; + final Value quotaSizeInBytes; + final Value quotaUsageInBytes; + final Value pinCode; + const AuthUserEntityCompanion({ + this.id = const Value.absent(), + this.name = const Value.absent(), + this.email = const Value.absent(), + this.isAdmin = const Value.absent(), + this.hasProfileImage = const Value.absent(), + this.profileChangedAt = const Value.absent(), + this.avatarColor = const Value.absent(), + this.quotaSizeInBytes = const Value.absent(), + this.quotaUsageInBytes = const Value.absent(), + this.pinCode = const Value.absent(), + }); + AuthUserEntityCompanion.insert({ + required String id, + required String name, + required String email, + this.isAdmin = const Value.absent(), + this.hasProfileImage = const Value.absent(), + this.profileChangedAt = const Value.absent(), + required int avatarColor, + this.quotaSizeInBytes = const Value.absent(), + this.quotaUsageInBytes = const Value.absent(), + this.pinCode = const Value.absent(), + }) : id = Value(id), + name = Value(name), + email = Value(email), + avatarColor = Value(avatarColor); + static Insertable custom({ + Expression? id, + Expression? name, + Expression? email, + Expression? isAdmin, + Expression? hasProfileImage, + Expression? profileChangedAt, + Expression? avatarColor, + Expression? quotaSizeInBytes, + Expression? quotaUsageInBytes, + Expression? pinCode, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (name != null) 'name': name, + if (email != null) 'email': email, + if (isAdmin != null) 'is_admin': isAdmin, + if (hasProfileImage != null) 'has_profile_image': hasProfileImage, + if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, + if (avatarColor != null) 'avatar_color': avatarColor, + if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, + if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, + if (pinCode != null) 'pin_code': pinCode, + }); + } + + AuthUserEntityCompanion copyWith({ + Value? id, + Value? name, + Value? email, + Value? isAdmin, + Value? hasProfileImage, + Value? profileChangedAt, + Value? avatarColor, + Value? quotaSizeInBytes, + Value? quotaUsageInBytes, + Value? pinCode, + }) { + return AuthUserEntityCompanion( + id: id ?? this.id, + name: name ?? this.name, + email: email ?? this.email, + isAdmin: isAdmin ?? this.isAdmin, + hasProfileImage: hasProfileImage ?? this.hasProfileImage, + profileChangedAt: profileChangedAt ?? this.profileChangedAt, + avatarColor: avatarColor ?? this.avatarColor, + quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, + quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, + pinCode: pinCode ?? this.pinCode, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (name.present) { + map['name'] = Variable(name.value); + } + if (email.present) { + map['email'] = Variable(email.value); + } + if (isAdmin.present) { + map['is_admin'] = Variable(isAdmin.value); + } + if (hasProfileImage.present) { + map['has_profile_image'] = Variable(hasProfileImage.value); + } + if (profileChangedAt.present) { + map['profile_changed_at'] = Variable(profileChangedAt.value); + } + if (avatarColor.present) { + map['avatar_color'] = Variable(avatarColor.value); + } + if (quotaSizeInBytes.present) { + map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); + } + if (quotaUsageInBytes.present) { + map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); + } + if (pinCode.present) { + map['pin_code'] = Variable(pinCode.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('AuthUserEntityCompanion(') + ..write('id: $id, ') + ..write('name: $name, ') + ..write('email: $email, ') + ..write('isAdmin: $isAdmin, ') + ..write('hasProfileImage: $hasProfileImage, ') + ..write('profileChangedAt: $profileChangedAt, ') + ..write('avatarColor: $avatarColor, ') + ..write('quotaSizeInBytes: $quotaSizeInBytes, ') + ..write('quotaUsageInBytes: $quotaUsageInBytes, ') + ..write('pinCode: $pinCode') + ..write(')')) + .toString(); + } +} + +class UserMetadataEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + UserMetadataEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn userId = GeneratedColumn( + 'user_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn key = GeneratedColumn( + 'key', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn value = GeneratedColumn( + 'value', + aliasedName, + false, + type: DriftSqlType.blob, + requiredDuringInsert: true, + ); + @override + List get $columns => [userId, key, value]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'user_metadata_entity'; + @override + Set get $primaryKey => {userId, key}; + @override + UserMetadataEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return UserMetadataEntityData( + userId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}user_id'], + )!, + key: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}key'], + )!, + value: attachedDatabase.typeMapping.read( + DriftSqlType.blob, + data['${effectivePrefix}value'], + )!, + ); + } + + @override + UserMetadataEntity createAlias(String alias) { + return UserMetadataEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class UserMetadataEntityData extends DataClass + implements Insertable { + final String userId; + final int key; + final Uint8List value; + const UserMetadataEntityData({ + required this.userId, + required this.key, + required this.value, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['user_id'] = Variable(userId); + map['key'] = Variable(key); + map['value'] = Variable(value); + return map; + } + + factory UserMetadataEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return UserMetadataEntityData( + userId: serializer.fromJson(json['userId']), + key: serializer.fromJson(json['key']), + value: serializer.fromJson(json['value']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'userId': serializer.toJson(userId), + 'key': serializer.toJson(key), + 'value': serializer.toJson(value), + }; + } + + UserMetadataEntityData copyWith({ + String? userId, + int? key, + Uint8List? value, + }) => UserMetadataEntityData( + userId: userId ?? this.userId, + key: key ?? this.key, + value: value ?? this.value, + ); + UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { + return UserMetadataEntityData( + userId: data.userId.present ? data.userId.value : this.userId, + key: data.key.present ? data.key.value : this.key, + value: data.value.present ? data.value.value : this.value, + ); + } + + @override + String toString() { + return (StringBuffer('UserMetadataEntityData(') + ..write('userId: $userId, ') + ..write('key: $key, ') + ..write('value: $value') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is UserMetadataEntityData && + other.userId == this.userId && + other.key == this.key && + $driftBlobEquality.equals(other.value, this.value)); +} + +class UserMetadataEntityCompanion + extends UpdateCompanion { + final Value userId; + final Value key; + final Value value; + const UserMetadataEntityCompanion({ + this.userId = const Value.absent(), + this.key = const Value.absent(), + this.value = const Value.absent(), + }); + UserMetadataEntityCompanion.insert({ + required String userId, + required int key, + required Uint8List value, + }) : userId = Value(userId), + key = Value(key), + value = Value(value); + static Insertable custom({ + Expression? userId, + Expression? key, + Expression? value, + }) { + return RawValuesInsertable({ + if (userId != null) 'user_id': userId, + if (key != null) 'key': key, + if (value != null) 'value': value, + }); + } + + UserMetadataEntityCompanion copyWith({ + Value? userId, + Value? key, + Value? value, + }) { + return UserMetadataEntityCompanion( + userId: userId ?? this.userId, + key: key ?? this.key, + value: value ?? this.value, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (userId.present) { + map['user_id'] = Variable(userId.value); + } + if (key.present) { + map['key'] = Variable(key.value); + } + if (value.present) { + map['value'] = Variable(value.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('UserMetadataEntityCompanion(') + ..write('userId: $userId, ') + ..write('key: $key, ') + ..write('value: $value') + ..write(')')) + .toString(); + } +} + +class PartnerEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + PartnerEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn sharedById = GeneratedColumn( + 'shared_by_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn sharedWithId = GeneratedColumn( + 'shared_with_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn inTimeline = GeneratedColumn( + 'in_timeline', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("in_timeline" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + @override + List get $columns => [sharedById, sharedWithId, inTimeline]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'partner_entity'; + @override + Set get $primaryKey => {sharedById, sharedWithId}; + @override + PartnerEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return PartnerEntityData( + sharedById: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}shared_by_id'], + )!, + sharedWithId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}shared_with_id'], + )!, + inTimeline: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}in_timeline'], + )!, + ); + } + + @override + PartnerEntity createAlias(String alias) { + return PartnerEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class PartnerEntityData extends DataClass + implements Insertable { + final String sharedById; + final String sharedWithId; + final bool inTimeline; + const PartnerEntityData({ + required this.sharedById, + required this.sharedWithId, + required this.inTimeline, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['shared_by_id'] = Variable(sharedById); + map['shared_with_id'] = Variable(sharedWithId); + map['in_timeline'] = Variable(inTimeline); + return map; + } + + factory PartnerEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return PartnerEntityData( + sharedById: serializer.fromJson(json['sharedById']), + sharedWithId: serializer.fromJson(json['sharedWithId']), + inTimeline: serializer.fromJson(json['inTimeline']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'sharedById': serializer.toJson(sharedById), + 'sharedWithId': serializer.toJson(sharedWithId), + 'inTimeline': serializer.toJson(inTimeline), + }; + } + + PartnerEntityData copyWith({ + String? sharedById, + String? sharedWithId, + bool? inTimeline, + }) => PartnerEntityData( + sharedById: sharedById ?? this.sharedById, + sharedWithId: sharedWithId ?? this.sharedWithId, + inTimeline: inTimeline ?? this.inTimeline, + ); + PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { + return PartnerEntityData( + sharedById: data.sharedById.present + ? data.sharedById.value + : this.sharedById, + sharedWithId: data.sharedWithId.present + ? data.sharedWithId.value + : this.sharedWithId, + inTimeline: data.inTimeline.present + ? data.inTimeline.value + : this.inTimeline, + ); + } + + @override + String toString() { + return (StringBuffer('PartnerEntityData(') + ..write('sharedById: $sharedById, ') + ..write('sharedWithId: $sharedWithId, ') + ..write('inTimeline: $inTimeline') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is PartnerEntityData && + other.sharedById == this.sharedById && + other.sharedWithId == this.sharedWithId && + other.inTimeline == this.inTimeline); +} + +class PartnerEntityCompanion extends UpdateCompanion { + final Value sharedById; + final Value sharedWithId; + final Value inTimeline; + const PartnerEntityCompanion({ + this.sharedById = const Value.absent(), + this.sharedWithId = const Value.absent(), + this.inTimeline = const Value.absent(), + }); + PartnerEntityCompanion.insert({ + required String sharedById, + required String sharedWithId, + this.inTimeline = const Value.absent(), + }) : sharedById = Value(sharedById), + sharedWithId = Value(sharedWithId); + static Insertable custom({ + Expression? sharedById, + Expression? sharedWithId, + Expression? inTimeline, + }) { + return RawValuesInsertable({ + if (sharedById != null) 'shared_by_id': sharedById, + if (sharedWithId != null) 'shared_with_id': sharedWithId, + if (inTimeline != null) 'in_timeline': inTimeline, + }); + } + + PartnerEntityCompanion copyWith({ + Value? sharedById, + Value? sharedWithId, + Value? inTimeline, + }) { + return PartnerEntityCompanion( + sharedById: sharedById ?? this.sharedById, + sharedWithId: sharedWithId ?? this.sharedWithId, + inTimeline: inTimeline ?? this.inTimeline, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (sharedById.present) { + map['shared_by_id'] = Variable(sharedById.value); + } + if (sharedWithId.present) { + map['shared_with_id'] = Variable(sharedWithId.value); + } + if (inTimeline.present) { + map['in_timeline'] = Variable(inTimeline.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('PartnerEntityCompanion(') + ..write('sharedById: $sharedById, ') + ..write('sharedWithId: $sharedWithId, ') + ..write('inTimeline: $inTimeline') + ..write(')')) + .toString(); + } +} + +class RemoteExifEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + RemoteExifEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn assetId = GeneratedColumn( + 'asset_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn city = GeneratedColumn( + 'city', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn state = GeneratedColumn( + 'state', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn country = GeneratedColumn( + 'country', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn dateTimeOriginal = + GeneratedColumn( + 'date_time_original', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + late final GeneratedColumn description = GeneratedColumn( + 'description', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn height = GeneratedColumn( + 'height', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn width = GeneratedColumn( + 'width', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn exposureTime = GeneratedColumn( + 'exposure_time', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn fNumber = GeneratedColumn( + 'f_number', + aliasedName, + true, + type: DriftSqlType.double, + requiredDuringInsert: false, + ); + late final GeneratedColumn fileSize = GeneratedColumn( + 'file_size', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn focalLength = GeneratedColumn( + 'focal_length', + aliasedName, + true, + type: DriftSqlType.double, + requiredDuringInsert: false, + ); + late final GeneratedColumn latitude = GeneratedColumn( + 'latitude', + aliasedName, + true, + type: DriftSqlType.double, + requiredDuringInsert: false, + ); + late final GeneratedColumn longitude = GeneratedColumn( + 'longitude', + aliasedName, + true, + type: DriftSqlType.double, + requiredDuringInsert: false, + ); + late final GeneratedColumn iso = GeneratedColumn( + 'iso', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn make = GeneratedColumn( + 'make', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn model = GeneratedColumn( + 'model', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn lens = GeneratedColumn( + 'lens', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn orientation = GeneratedColumn( + 'orientation', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn timeZone = GeneratedColumn( + 'time_zone', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn rating = GeneratedColumn( + 'rating', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn projectionType = GeneratedColumn( + 'projection_type', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + @override + List get $columns => [ + assetId, + city, + state, + country, + dateTimeOriginal, + description, + height, + width, + exposureTime, + fNumber, + fileSize, + focalLength, + latitude, + longitude, + iso, + make, + model, + lens, + orientation, + timeZone, + rating, + projectionType, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'remote_exif_entity'; + @override + Set get $primaryKey => {assetId}; + @override + RemoteExifEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return RemoteExifEntityData( + assetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}asset_id'], + )!, + city: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}city'], + ), + state: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}state'], + ), + country: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}country'], + ), + dateTimeOriginal: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}date_time_original'], + ), + description: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}description'], + ), + height: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}height'], + ), + width: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}width'], + ), + exposureTime: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}exposure_time'], + ), + fNumber: attachedDatabase.typeMapping.read( + DriftSqlType.double, + data['${effectivePrefix}f_number'], + ), + fileSize: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}file_size'], + ), + focalLength: attachedDatabase.typeMapping.read( + DriftSqlType.double, + data['${effectivePrefix}focal_length'], + ), + latitude: attachedDatabase.typeMapping.read( + DriftSqlType.double, + data['${effectivePrefix}latitude'], + ), + longitude: attachedDatabase.typeMapping.read( + DriftSqlType.double, + data['${effectivePrefix}longitude'], + ), + iso: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}iso'], + ), + make: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}make'], + ), + model: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}model'], + ), + lens: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}lens'], + ), + orientation: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}orientation'], + ), + timeZone: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}time_zone'], + ), + rating: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}rating'], + ), + projectionType: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}projection_type'], + ), + ); + } + + @override + RemoteExifEntity createAlias(String alias) { + return RemoteExifEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class RemoteExifEntityData extends DataClass + implements Insertable { + final String assetId; + final String? city; + final String? state; + final String? country; + final DateTime? dateTimeOriginal; + final String? description; + final int? height; + final int? width; + final String? exposureTime; + final double? fNumber; + final int? fileSize; + final double? focalLength; + final double? latitude; + final double? longitude; + final int? iso; + final String? make; + final String? model; + final String? lens; + final String? orientation; + final String? timeZone; + final int? rating; + final String? projectionType; + const RemoteExifEntityData({ + required this.assetId, + this.city, + this.state, + this.country, + this.dateTimeOriginal, + this.description, + this.height, + this.width, + this.exposureTime, + this.fNumber, + this.fileSize, + this.focalLength, + this.latitude, + this.longitude, + this.iso, + this.make, + this.model, + this.lens, + this.orientation, + this.timeZone, + this.rating, + this.projectionType, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['asset_id'] = Variable(assetId); + if (!nullToAbsent || city != null) { + map['city'] = Variable(city); + } + if (!nullToAbsent || state != null) { + map['state'] = Variable(state); + } + if (!nullToAbsent || country != null) { + map['country'] = Variable(country); + } + if (!nullToAbsent || dateTimeOriginal != null) { + map['date_time_original'] = Variable(dateTimeOriginal); + } + if (!nullToAbsent || description != null) { + map['description'] = Variable(description); + } + if (!nullToAbsent || height != null) { + map['height'] = Variable(height); + } + if (!nullToAbsent || width != null) { + map['width'] = Variable(width); + } + if (!nullToAbsent || exposureTime != null) { + map['exposure_time'] = Variable(exposureTime); + } + if (!nullToAbsent || fNumber != null) { + map['f_number'] = Variable(fNumber); + } + if (!nullToAbsent || fileSize != null) { + map['file_size'] = Variable(fileSize); + } + if (!nullToAbsent || focalLength != null) { + map['focal_length'] = Variable(focalLength); + } + if (!nullToAbsent || latitude != null) { + map['latitude'] = Variable(latitude); + } + if (!nullToAbsent || longitude != null) { + map['longitude'] = Variable(longitude); + } + if (!nullToAbsent || iso != null) { + map['iso'] = Variable(iso); + } + if (!nullToAbsent || make != null) { + map['make'] = Variable(make); + } + if (!nullToAbsent || model != null) { + map['model'] = Variable(model); + } + if (!nullToAbsent || lens != null) { + map['lens'] = Variable(lens); + } + if (!nullToAbsent || orientation != null) { + map['orientation'] = Variable(orientation); + } + if (!nullToAbsent || timeZone != null) { + map['time_zone'] = Variable(timeZone); + } + if (!nullToAbsent || rating != null) { + map['rating'] = Variable(rating); + } + if (!nullToAbsent || projectionType != null) { + map['projection_type'] = Variable(projectionType); + } + return map; + } + + factory RemoteExifEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return RemoteExifEntityData( + assetId: serializer.fromJson(json['assetId']), + city: serializer.fromJson(json['city']), + state: serializer.fromJson(json['state']), + country: serializer.fromJson(json['country']), + dateTimeOriginal: serializer.fromJson( + json['dateTimeOriginal'], + ), + description: serializer.fromJson(json['description']), + height: serializer.fromJson(json['height']), + width: serializer.fromJson(json['width']), + exposureTime: serializer.fromJson(json['exposureTime']), + fNumber: serializer.fromJson(json['fNumber']), + fileSize: serializer.fromJson(json['fileSize']), + focalLength: serializer.fromJson(json['focalLength']), + latitude: serializer.fromJson(json['latitude']), + longitude: serializer.fromJson(json['longitude']), + iso: serializer.fromJson(json['iso']), + make: serializer.fromJson(json['make']), + model: serializer.fromJson(json['model']), + lens: serializer.fromJson(json['lens']), + orientation: serializer.fromJson(json['orientation']), + timeZone: serializer.fromJson(json['timeZone']), + rating: serializer.fromJson(json['rating']), + projectionType: serializer.fromJson(json['projectionType']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'assetId': serializer.toJson(assetId), + 'city': serializer.toJson(city), + 'state': serializer.toJson(state), + 'country': serializer.toJson(country), + 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), + 'description': serializer.toJson(description), + 'height': serializer.toJson(height), + 'width': serializer.toJson(width), + 'exposureTime': serializer.toJson(exposureTime), + 'fNumber': serializer.toJson(fNumber), + 'fileSize': serializer.toJson(fileSize), + 'focalLength': serializer.toJson(focalLength), + 'latitude': serializer.toJson(latitude), + 'longitude': serializer.toJson(longitude), + 'iso': serializer.toJson(iso), + 'make': serializer.toJson(make), + 'model': serializer.toJson(model), + 'lens': serializer.toJson(lens), + 'orientation': serializer.toJson(orientation), + 'timeZone': serializer.toJson(timeZone), + 'rating': serializer.toJson(rating), + 'projectionType': serializer.toJson(projectionType), + }; + } + + RemoteExifEntityData copyWith({ + String? assetId, + Value city = const Value.absent(), + Value state = const Value.absent(), + Value country = const Value.absent(), + Value dateTimeOriginal = const Value.absent(), + Value description = const Value.absent(), + Value height = const Value.absent(), + Value width = const Value.absent(), + Value exposureTime = const Value.absent(), + Value fNumber = const Value.absent(), + Value fileSize = const Value.absent(), + Value focalLength = const Value.absent(), + Value latitude = const Value.absent(), + Value longitude = const Value.absent(), + Value iso = const Value.absent(), + Value make = const Value.absent(), + Value model = const Value.absent(), + Value lens = const Value.absent(), + Value orientation = const Value.absent(), + Value timeZone = const Value.absent(), + Value rating = const Value.absent(), + Value projectionType = const Value.absent(), + }) => RemoteExifEntityData( + assetId: assetId ?? this.assetId, + city: city.present ? city.value : this.city, + state: state.present ? state.value : this.state, + country: country.present ? country.value : this.country, + dateTimeOriginal: dateTimeOriginal.present + ? dateTimeOriginal.value + : this.dateTimeOriginal, + description: description.present ? description.value : this.description, + height: height.present ? height.value : this.height, + width: width.present ? width.value : this.width, + exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, + fNumber: fNumber.present ? fNumber.value : this.fNumber, + fileSize: fileSize.present ? fileSize.value : this.fileSize, + focalLength: focalLength.present ? focalLength.value : this.focalLength, + latitude: latitude.present ? latitude.value : this.latitude, + longitude: longitude.present ? longitude.value : this.longitude, + iso: iso.present ? iso.value : this.iso, + make: make.present ? make.value : this.make, + model: model.present ? model.value : this.model, + lens: lens.present ? lens.value : this.lens, + orientation: orientation.present ? orientation.value : this.orientation, + timeZone: timeZone.present ? timeZone.value : this.timeZone, + rating: rating.present ? rating.value : this.rating, + projectionType: projectionType.present + ? projectionType.value + : this.projectionType, + ); + RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { + return RemoteExifEntityData( + assetId: data.assetId.present ? data.assetId.value : this.assetId, + city: data.city.present ? data.city.value : this.city, + state: data.state.present ? data.state.value : this.state, + country: data.country.present ? data.country.value : this.country, + dateTimeOriginal: data.dateTimeOriginal.present + ? data.dateTimeOriginal.value + : this.dateTimeOriginal, + description: data.description.present + ? data.description.value + : this.description, + height: data.height.present ? data.height.value : this.height, + width: data.width.present ? data.width.value : this.width, + exposureTime: data.exposureTime.present + ? data.exposureTime.value + : this.exposureTime, + fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, + fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, + focalLength: data.focalLength.present + ? data.focalLength.value + : this.focalLength, + latitude: data.latitude.present ? data.latitude.value : this.latitude, + longitude: data.longitude.present ? data.longitude.value : this.longitude, + iso: data.iso.present ? data.iso.value : this.iso, + make: data.make.present ? data.make.value : this.make, + model: data.model.present ? data.model.value : this.model, + lens: data.lens.present ? data.lens.value : this.lens, + orientation: data.orientation.present + ? data.orientation.value + : this.orientation, + timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, + rating: data.rating.present ? data.rating.value : this.rating, + projectionType: data.projectionType.present + ? data.projectionType.value + : this.projectionType, + ); + } + + @override + String toString() { + return (StringBuffer('RemoteExifEntityData(') + ..write('assetId: $assetId, ') + ..write('city: $city, ') + ..write('state: $state, ') + ..write('country: $country, ') + ..write('dateTimeOriginal: $dateTimeOriginal, ') + ..write('description: $description, ') + ..write('height: $height, ') + ..write('width: $width, ') + ..write('exposureTime: $exposureTime, ') + ..write('fNumber: $fNumber, ') + ..write('fileSize: $fileSize, ') + ..write('focalLength: $focalLength, ') + ..write('latitude: $latitude, ') + ..write('longitude: $longitude, ') + ..write('iso: $iso, ') + ..write('make: $make, ') + ..write('model: $model, ') + ..write('lens: $lens, ') + ..write('orientation: $orientation, ') + ..write('timeZone: $timeZone, ') + ..write('rating: $rating, ') + ..write('projectionType: $projectionType') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hashAll([ + assetId, + city, + state, + country, + dateTimeOriginal, + description, + height, + width, + exposureTime, + fNumber, + fileSize, + focalLength, + latitude, + longitude, + iso, + make, + model, + lens, + orientation, + timeZone, + rating, + projectionType, + ]); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is RemoteExifEntityData && + other.assetId == this.assetId && + other.city == this.city && + other.state == this.state && + other.country == this.country && + other.dateTimeOriginal == this.dateTimeOriginal && + other.description == this.description && + other.height == this.height && + other.width == this.width && + other.exposureTime == this.exposureTime && + other.fNumber == this.fNumber && + other.fileSize == this.fileSize && + other.focalLength == this.focalLength && + other.latitude == this.latitude && + other.longitude == this.longitude && + other.iso == this.iso && + other.make == this.make && + other.model == this.model && + other.lens == this.lens && + other.orientation == this.orientation && + other.timeZone == this.timeZone && + other.rating == this.rating && + other.projectionType == this.projectionType); +} + +class RemoteExifEntityCompanion extends UpdateCompanion { + final Value assetId; + final Value city; + final Value state; + final Value country; + final Value dateTimeOriginal; + final Value description; + final Value height; + final Value width; + final Value exposureTime; + final Value fNumber; + final Value fileSize; + final Value focalLength; + final Value latitude; + final Value longitude; + final Value iso; + final Value make; + final Value model; + final Value lens; + final Value orientation; + final Value timeZone; + final Value rating; + final Value projectionType; + const RemoteExifEntityCompanion({ + this.assetId = const Value.absent(), + this.city = const Value.absent(), + this.state = const Value.absent(), + this.country = const Value.absent(), + this.dateTimeOriginal = const Value.absent(), + this.description = const Value.absent(), + this.height = const Value.absent(), + this.width = const Value.absent(), + this.exposureTime = const Value.absent(), + this.fNumber = const Value.absent(), + this.fileSize = const Value.absent(), + this.focalLength = const Value.absent(), + this.latitude = const Value.absent(), + this.longitude = const Value.absent(), + this.iso = const Value.absent(), + this.make = const Value.absent(), + this.model = const Value.absent(), + this.lens = const Value.absent(), + this.orientation = const Value.absent(), + this.timeZone = const Value.absent(), + this.rating = const Value.absent(), + this.projectionType = const Value.absent(), + }); + RemoteExifEntityCompanion.insert({ + required String assetId, + this.city = const Value.absent(), + this.state = const Value.absent(), + this.country = const Value.absent(), + this.dateTimeOriginal = const Value.absent(), + this.description = const Value.absent(), + this.height = const Value.absent(), + this.width = const Value.absent(), + this.exposureTime = const Value.absent(), + this.fNumber = const Value.absent(), + this.fileSize = const Value.absent(), + this.focalLength = const Value.absent(), + this.latitude = const Value.absent(), + this.longitude = const Value.absent(), + this.iso = const Value.absent(), + this.make = const Value.absent(), + this.model = const Value.absent(), + this.lens = const Value.absent(), + this.orientation = const Value.absent(), + this.timeZone = const Value.absent(), + this.rating = const Value.absent(), + this.projectionType = const Value.absent(), + }) : assetId = Value(assetId); + static Insertable custom({ + Expression? assetId, + Expression? city, + Expression? state, + Expression? country, + Expression? dateTimeOriginal, + Expression? description, + Expression? height, + Expression? width, + Expression? exposureTime, + Expression? fNumber, + Expression? fileSize, + Expression? focalLength, + Expression? latitude, + Expression? longitude, + Expression? iso, + Expression? make, + Expression? model, + Expression? lens, + Expression? orientation, + Expression? timeZone, + Expression? rating, + Expression? projectionType, + }) { + return RawValuesInsertable({ + if (assetId != null) 'asset_id': assetId, + if (city != null) 'city': city, + if (state != null) 'state': state, + if (country != null) 'country': country, + if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, + if (description != null) 'description': description, + if (height != null) 'height': height, + if (width != null) 'width': width, + if (exposureTime != null) 'exposure_time': exposureTime, + if (fNumber != null) 'f_number': fNumber, + if (fileSize != null) 'file_size': fileSize, + if (focalLength != null) 'focal_length': focalLength, + if (latitude != null) 'latitude': latitude, + if (longitude != null) 'longitude': longitude, + if (iso != null) 'iso': iso, + if (make != null) 'make': make, + if (model != null) 'model': model, + if (lens != null) 'lens': lens, + if (orientation != null) 'orientation': orientation, + if (timeZone != null) 'time_zone': timeZone, + if (rating != null) 'rating': rating, + if (projectionType != null) 'projection_type': projectionType, + }); + } + + RemoteExifEntityCompanion copyWith({ + Value? assetId, + Value? city, + Value? state, + Value? country, + Value? dateTimeOriginal, + Value? description, + Value? height, + Value? width, + Value? exposureTime, + Value? fNumber, + Value? fileSize, + Value? focalLength, + Value? latitude, + Value? longitude, + Value? iso, + Value? make, + Value? model, + Value? lens, + Value? orientation, + Value? timeZone, + Value? rating, + Value? projectionType, + }) { + return RemoteExifEntityCompanion( + assetId: assetId ?? this.assetId, + city: city ?? this.city, + state: state ?? this.state, + country: country ?? this.country, + dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, + description: description ?? this.description, + height: height ?? this.height, + width: width ?? this.width, + exposureTime: exposureTime ?? this.exposureTime, + fNumber: fNumber ?? this.fNumber, + fileSize: fileSize ?? this.fileSize, + focalLength: focalLength ?? this.focalLength, + latitude: latitude ?? this.latitude, + longitude: longitude ?? this.longitude, + iso: iso ?? this.iso, + make: make ?? this.make, + model: model ?? this.model, + lens: lens ?? this.lens, + orientation: orientation ?? this.orientation, + timeZone: timeZone ?? this.timeZone, + rating: rating ?? this.rating, + projectionType: projectionType ?? this.projectionType, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (assetId.present) { + map['asset_id'] = Variable(assetId.value); + } + if (city.present) { + map['city'] = Variable(city.value); + } + if (state.present) { + map['state'] = Variable(state.value); + } + if (country.present) { + map['country'] = Variable(country.value); + } + if (dateTimeOriginal.present) { + map['date_time_original'] = Variable(dateTimeOriginal.value); + } + if (description.present) { + map['description'] = Variable(description.value); + } + if (height.present) { + map['height'] = Variable(height.value); + } + if (width.present) { + map['width'] = Variable(width.value); + } + if (exposureTime.present) { + map['exposure_time'] = Variable(exposureTime.value); + } + if (fNumber.present) { + map['f_number'] = Variable(fNumber.value); + } + if (fileSize.present) { + map['file_size'] = Variable(fileSize.value); + } + if (focalLength.present) { + map['focal_length'] = Variable(focalLength.value); + } + if (latitude.present) { + map['latitude'] = Variable(latitude.value); + } + if (longitude.present) { + map['longitude'] = Variable(longitude.value); + } + if (iso.present) { + map['iso'] = Variable(iso.value); + } + if (make.present) { + map['make'] = Variable(make.value); + } + if (model.present) { + map['model'] = Variable(model.value); + } + if (lens.present) { + map['lens'] = Variable(lens.value); + } + if (orientation.present) { + map['orientation'] = Variable(orientation.value); + } + if (timeZone.present) { + map['time_zone'] = Variable(timeZone.value); + } + if (rating.present) { + map['rating'] = Variable(rating.value); + } + if (projectionType.present) { + map['projection_type'] = Variable(projectionType.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('RemoteExifEntityCompanion(') + ..write('assetId: $assetId, ') + ..write('city: $city, ') + ..write('state: $state, ') + ..write('country: $country, ') + ..write('dateTimeOriginal: $dateTimeOriginal, ') + ..write('description: $description, ') + ..write('height: $height, ') + ..write('width: $width, ') + ..write('exposureTime: $exposureTime, ') + ..write('fNumber: $fNumber, ') + ..write('fileSize: $fileSize, ') + ..write('focalLength: $focalLength, ') + ..write('latitude: $latitude, ') + ..write('longitude: $longitude, ') + ..write('iso: $iso, ') + ..write('make: $make, ') + ..write('model: $model, ') + ..write('lens: $lens, ') + ..write('orientation: $orientation, ') + ..write('timeZone: $timeZone, ') + ..write('rating: $rating, ') + ..write('projectionType: $projectionType') + ..write(')')) + .toString(); + } +} + +class RemoteAlbumAssetEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn assetId = GeneratedColumn( + 'asset_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn albumId = GeneratedColumn( + 'album_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', + ), + ); + @override + List get $columns => [assetId, albumId]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'remote_album_asset_entity'; + @override + Set get $primaryKey => {assetId, albumId}; + @override + RemoteAlbumAssetEntityData map( + Map data, { + String? tablePrefix, + }) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return RemoteAlbumAssetEntityData( + assetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}asset_id'], + )!, + albumId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}album_id'], + )!, + ); + } + + @override + RemoteAlbumAssetEntity createAlias(String alias) { + return RemoteAlbumAssetEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class RemoteAlbumAssetEntityData extends DataClass + implements Insertable { + final String assetId; + final String albumId; + const RemoteAlbumAssetEntityData({ + required this.assetId, + required this.albumId, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['asset_id'] = Variable(assetId); + map['album_id'] = Variable(albumId); + return map; + } + + factory RemoteAlbumAssetEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return RemoteAlbumAssetEntityData( + assetId: serializer.fromJson(json['assetId']), + albumId: serializer.fromJson(json['albumId']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'assetId': serializer.toJson(assetId), + 'albumId': serializer.toJson(albumId), + }; + } + + RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => + RemoteAlbumAssetEntityData( + assetId: assetId ?? this.assetId, + albumId: albumId ?? this.albumId, + ); + RemoteAlbumAssetEntityData copyWithCompanion( + RemoteAlbumAssetEntityCompanion data, + ) { + return RemoteAlbumAssetEntityData( + assetId: data.assetId.present ? data.assetId.value : this.assetId, + albumId: data.albumId.present ? data.albumId.value : this.albumId, + ); + } + + @override + String toString() { + return (StringBuffer('RemoteAlbumAssetEntityData(') + ..write('assetId: $assetId, ') + ..write('albumId: $albumId') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(assetId, albumId); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is RemoteAlbumAssetEntityData && + other.assetId == this.assetId && + other.albumId == this.albumId); +} + +class RemoteAlbumAssetEntityCompanion + extends UpdateCompanion { + final Value assetId; + final Value albumId; + const RemoteAlbumAssetEntityCompanion({ + this.assetId = const Value.absent(), + this.albumId = const Value.absent(), + }); + RemoteAlbumAssetEntityCompanion.insert({ + required String assetId, + required String albumId, + }) : assetId = Value(assetId), + albumId = Value(albumId); + static Insertable custom({ + Expression? assetId, + Expression? albumId, + }) { + return RawValuesInsertable({ + if (assetId != null) 'asset_id': assetId, + if (albumId != null) 'album_id': albumId, + }); + } + + RemoteAlbumAssetEntityCompanion copyWith({ + Value? assetId, + Value? albumId, + }) { + return RemoteAlbumAssetEntityCompanion( + assetId: assetId ?? this.assetId, + albumId: albumId ?? this.albumId, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (assetId.present) { + map['asset_id'] = Variable(assetId.value); + } + if (albumId.present) { + map['album_id'] = Variable(albumId.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('RemoteAlbumAssetEntityCompanion(') + ..write('assetId: $assetId, ') + ..write('albumId: $albumId') + ..write(')')) + .toString(); + } +} + +class RemoteAlbumUserEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn albumId = GeneratedColumn( + 'album_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_album_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn userId = GeneratedColumn( + 'user_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn role = GeneratedColumn( + 'role', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + @override + List get $columns => [albumId, userId, role]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'remote_album_user_entity'; + @override + Set get $primaryKey => {albumId, userId}; + @override + RemoteAlbumUserEntityData map( + Map data, { + String? tablePrefix, + }) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return RemoteAlbumUserEntityData( + albumId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}album_id'], + )!, + userId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}user_id'], + )!, + role: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}role'], + )!, + ); + } + + @override + RemoteAlbumUserEntity createAlias(String alias) { + return RemoteAlbumUserEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class RemoteAlbumUserEntityData extends DataClass + implements Insertable { + final String albumId; + final String userId; + final int role; + const RemoteAlbumUserEntityData({ + required this.albumId, + required this.userId, + required this.role, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['album_id'] = Variable(albumId); + map['user_id'] = Variable(userId); + map['role'] = Variable(role); + return map; + } + + factory RemoteAlbumUserEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return RemoteAlbumUserEntityData( + albumId: serializer.fromJson(json['albumId']), + userId: serializer.fromJson(json['userId']), + role: serializer.fromJson(json['role']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'albumId': serializer.toJson(albumId), + 'userId': serializer.toJson(userId), + 'role': serializer.toJson(role), + }; + } + + RemoteAlbumUserEntityData copyWith({ + String? albumId, + String? userId, + int? role, + }) => RemoteAlbumUserEntityData( + albumId: albumId ?? this.albumId, + userId: userId ?? this.userId, + role: role ?? this.role, + ); + RemoteAlbumUserEntityData copyWithCompanion( + RemoteAlbumUserEntityCompanion data, + ) { + return RemoteAlbumUserEntityData( + albumId: data.albumId.present ? data.albumId.value : this.albumId, + userId: data.userId.present ? data.userId.value : this.userId, + role: data.role.present ? data.role.value : this.role, + ); + } + + @override + String toString() { + return (StringBuffer('RemoteAlbumUserEntityData(') + ..write('albumId: $albumId, ') + ..write('userId: $userId, ') + ..write('role: $role') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(albumId, userId, role); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is RemoteAlbumUserEntityData && + other.albumId == this.albumId && + other.userId == this.userId && + other.role == this.role); +} + +class RemoteAlbumUserEntityCompanion + extends UpdateCompanion { + final Value albumId; + final Value userId; + final Value role; + const RemoteAlbumUserEntityCompanion({ + this.albumId = const Value.absent(), + this.userId = const Value.absent(), + this.role = const Value.absent(), + }); + RemoteAlbumUserEntityCompanion.insert({ + required String albumId, + required String userId, + required int role, + }) : albumId = Value(albumId), + userId = Value(userId), + role = Value(role); + static Insertable custom({ + Expression? albumId, + Expression? userId, + Expression? role, + }) { + return RawValuesInsertable({ + if (albumId != null) 'album_id': albumId, + if (userId != null) 'user_id': userId, + if (role != null) 'role': role, + }); + } + + RemoteAlbumUserEntityCompanion copyWith({ + Value? albumId, + Value? userId, + Value? role, + }) { + return RemoteAlbumUserEntityCompanion( + albumId: albumId ?? this.albumId, + userId: userId ?? this.userId, + role: role ?? this.role, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (albumId.present) { + map['album_id'] = Variable(albumId.value); + } + if (userId.present) { + map['user_id'] = Variable(userId.value); + } + if (role.present) { + map['role'] = Variable(role.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('RemoteAlbumUserEntityCompanion(') + ..write('albumId: $albumId, ') + ..write('userId: $userId, ') + ..write('role: $role') + ..write(')')) + .toString(); + } +} + +class MemoryEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + MemoryEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn deletedAt = GeneratedColumn( + 'deleted_at', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + late final GeneratedColumn ownerId = GeneratedColumn( + 'owner_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn type = GeneratedColumn( + 'type', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn data = GeneratedColumn( + 'data', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn isSaved = GeneratedColumn( + 'is_saved', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_saved" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn memoryAt = GeneratedColumn( + 'memory_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: true, + ); + late final GeneratedColumn seenAt = GeneratedColumn( + 'seen_at', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + late final GeneratedColumn showAt = GeneratedColumn( + 'show_at', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + late final GeneratedColumn hideAt = GeneratedColumn( + 'hide_at', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + @override + List get $columns => [ + id, + createdAt, + updatedAt, + deletedAt, + ownerId, + type, + data, + isSaved, + memoryAt, + seenAt, + showAt, + hideAt, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'memory_entity'; + @override + Set get $primaryKey => {id}; + @override + MemoryEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return MemoryEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + deletedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}deleted_at'], + ), + ownerId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}owner_id'], + )!, + type: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}type'], + )!, + data: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}data'], + )!, + isSaved: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_saved'], + )!, + memoryAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}memory_at'], + )!, + seenAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}seen_at'], + ), + showAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}show_at'], + ), + hideAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}hide_at'], + ), + ); + } + + @override + MemoryEntity createAlias(String alias) { + return MemoryEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class MemoryEntityData extends DataClass + implements Insertable { + final String id; + final DateTime createdAt; + final DateTime updatedAt; + final DateTime? deletedAt; + final String ownerId; + final int type; + final String data; + final bool isSaved; + final DateTime memoryAt; + final DateTime? seenAt; + final DateTime? showAt; + final DateTime? hideAt; + const MemoryEntityData({ + required this.id, + required this.createdAt, + required this.updatedAt, + this.deletedAt, + required this.ownerId, + required this.type, + required this.data, + required this.isSaved, + required this.memoryAt, + this.seenAt, + this.showAt, + this.hideAt, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + if (!nullToAbsent || deletedAt != null) { + map['deleted_at'] = Variable(deletedAt); + } + map['owner_id'] = Variable(ownerId); + map['type'] = Variable(type); + map['data'] = Variable(data); + map['is_saved'] = Variable(isSaved); + map['memory_at'] = Variable(memoryAt); + if (!nullToAbsent || seenAt != null) { + map['seen_at'] = Variable(seenAt); + } + if (!nullToAbsent || showAt != null) { + map['show_at'] = Variable(showAt); + } + if (!nullToAbsent || hideAt != null) { + map['hide_at'] = Variable(hideAt); + } + return map; + } + + factory MemoryEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return MemoryEntityData( + id: serializer.fromJson(json['id']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + deletedAt: serializer.fromJson(json['deletedAt']), + ownerId: serializer.fromJson(json['ownerId']), + type: serializer.fromJson(json['type']), + data: serializer.fromJson(json['data']), + isSaved: serializer.fromJson(json['isSaved']), + memoryAt: serializer.fromJson(json['memoryAt']), + seenAt: serializer.fromJson(json['seenAt']), + showAt: serializer.fromJson(json['showAt']), + hideAt: serializer.fromJson(json['hideAt']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'deletedAt': serializer.toJson(deletedAt), + 'ownerId': serializer.toJson(ownerId), + 'type': serializer.toJson(type), + 'data': serializer.toJson(data), + 'isSaved': serializer.toJson(isSaved), + 'memoryAt': serializer.toJson(memoryAt), + 'seenAt': serializer.toJson(seenAt), + 'showAt': serializer.toJson(showAt), + 'hideAt': serializer.toJson(hideAt), + }; + } + + MemoryEntityData copyWith({ + String? id, + DateTime? createdAt, + DateTime? updatedAt, + Value deletedAt = const Value.absent(), + String? ownerId, + int? type, + String? data, + bool? isSaved, + DateTime? memoryAt, + Value seenAt = const Value.absent(), + Value showAt = const Value.absent(), + Value hideAt = const Value.absent(), + }) => MemoryEntityData( + id: id ?? this.id, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, + ownerId: ownerId ?? this.ownerId, + type: type ?? this.type, + data: data ?? this.data, + isSaved: isSaved ?? this.isSaved, + memoryAt: memoryAt ?? this.memoryAt, + seenAt: seenAt.present ? seenAt.value : this.seenAt, + showAt: showAt.present ? showAt.value : this.showAt, + hideAt: hideAt.present ? hideAt.value : this.hideAt, + ); + MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { + return MemoryEntityData( + id: data.id.present ? data.id.value : this.id, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, + ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, + type: data.type.present ? data.type.value : this.type, + data: data.data.present ? data.data.value : this.data, + isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, + memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, + seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, + showAt: data.showAt.present ? data.showAt.value : this.showAt, + hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, + ); + } + + @override + String toString() { + return (StringBuffer('MemoryEntityData(') + ..write('id: $id, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('deletedAt: $deletedAt, ') + ..write('ownerId: $ownerId, ') + ..write('type: $type, ') + ..write('data: $data, ') + ..write('isSaved: $isSaved, ') + ..write('memoryAt: $memoryAt, ') + ..write('seenAt: $seenAt, ') + ..write('showAt: $showAt, ') + ..write('hideAt: $hideAt') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + createdAt, + updatedAt, + deletedAt, + ownerId, + type, + data, + isSaved, + memoryAt, + seenAt, + showAt, + hideAt, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is MemoryEntityData && + other.id == this.id && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.deletedAt == this.deletedAt && + other.ownerId == this.ownerId && + other.type == this.type && + other.data == this.data && + other.isSaved == this.isSaved && + other.memoryAt == this.memoryAt && + other.seenAt == this.seenAt && + other.showAt == this.showAt && + other.hideAt == this.hideAt); +} + +class MemoryEntityCompanion extends UpdateCompanion { + final Value id; + final Value createdAt; + final Value updatedAt; + final Value deletedAt; + final Value ownerId; + final Value type; + final Value data; + final Value isSaved; + final Value memoryAt; + final Value seenAt; + final Value showAt; + final Value hideAt; + const MemoryEntityCompanion({ + this.id = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.deletedAt = const Value.absent(), + this.ownerId = const Value.absent(), + this.type = const Value.absent(), + this.data = const Value.absent(), + this.isSaved = const Value.absent(), + this.memoryAt = const Value.absent(), + this.seenAt = const Value.absent(), + this.showAt = const Value.absent(), + this.hideAt = const Value.absent(), + }); + MemoryEntityCompanion.insert({ + required String id, + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.deletedAt = const Value.absent(), + required String ownerId, + required int type, + required String data, + this.isSaved = const Value.absent(), + required DateTime memoryAt, + this.seenAt = const Value.absent(), + this.showAt = const Value.absent(), + this.hideAt = const Value.absent(), + }) : id = Value(id), + ownerId = Value(ownerId), + type = Value(type), + data = Value(data), + memoryAt = Value(memoryAt); + static Insertable custom({ + Expression? id, + Expression? createdAt, + Expression? updatedAt, + Expression? deletedAt, + Expression? ownerId, + Expression? type, + Expression? data, + Expression? isSaved, + Expression? memoryAt, + Expression? seenAt, + Expression? showAt, + Expression? hideAt, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (deletedAt != null) 'deleted_at': deletedAt, + if (ownerId != null) 'owner_id': ownerId, + if (type != null) 'type': type, + if (data != null) 'data': data, + if (isSaved != null) 'is_saved': isSaved, + if (memoryAt != null) 'memory_at': memoryAt, + if (seenAt != null) 'seen_at': seenAt, + if (showAt != null) 'show_at': showAt, + if (hideAt != null) 'hide_at': hideAt, + }); + } + + MemoryEntityCompanion copyWith({ + Value? id, + Value? createdAt, + Value? updatedAt, + Value? deletedAt, + Value? ownerId, + Value? type, + Value? data, + Value? isSaved, + Value? memoryAt, + Value? seenAt, + Value? showAt, + Value? hideAt, + }) { + return MemoryEntityCompanion( + id: id ?? this.id, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + deletedAt: deletedAt ?? this.deletedAt, + ownerId: ownerId ?? this.ownerId, + type: type ?? this.type, + data: data ?? this.data, + isSaved: isSaved ?? this.isSaved, + memoryAt: memoryAt ?? this.memoryAt, + seenAt: seenAt ?? this.seenAt, + showAt: showAt ?? this.showAt, + hideAt: hideAt ?? this.hideAt, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (deletedAt.present) { + map['deleted_at'] = Variable(deletedAt.value); + } + if (ownerId.present) { + map['owner_id'] = Variable(ownerId.value); + } + if (type.present) { + map['type'] = Variable(type.value); + } + if (data.present) { + map['data'] = Variable(data.value); + } + if (isSaved.present) { + map['is_saved'] = Variable(isSaved.value); + } + if (memoryAt.present) { + map['memory_at'] = Variable(memoryAt.value); + } + if (seenAt.present) { + map['seen_at'] = Variable(seenAt.value); + } + if (showAt.present) { + map['show_at'] = Variable(showAt.value); + } + if (hideAt.present) { + map['hide_at'] = Variable(hideAt.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('MemoryEntityCompanion(') + ..write('id: $id, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('deletedAt: $deletedAt, ') + ..write('ownerId: $ownerId, ') + ..write('type: $type, ') + ..write('data: $data, ') + ..write('isSaved: $isSaved, ') + ..write('memoryAt: $memoryAt, ') + ..write('seenAt: $seenAt, ') + ..write('showAt: $showAt, ') + ..write('hideAt: $hideAt') + ..write(')')) + .toString(); + } +} + +class MemoryAssetEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + MemoryAssetEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn assetId = GeneratedColumn( + 'asset_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn memoryId = GeneratedColumn( + 'memory_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES memory_entity (id) ON DELETE CASCADE', + ), + ); + @override + List get $columns => [assetId, memoryId]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'memory_asset_entity'; + @override + Set get $primaryKey => {assetId, memoryId}; + @override + MemoryAssetEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return MemoryAssetEntityData( + assetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}asset_id'], + )!, + memoryId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}memory_id'], + )!, + ); + } + + @override + MemoryAssetEntity createAlias(String alias) { + return MemoryAssetEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class MemoryAssetEntityData extends DataClass + implements Insertable { + final String assetId; + final String memoryId; + const MemoryAssetEntityData({required this.assetId, required this.memoryId}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['asset_id'] = Variable(assetId); + map['memory_id'] = Variable(memoryId); + return map; + } + + factory MemoryAssetEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return MemoryAssetEntityData( + assetId: serializer.fromJson(json['assetId']), + memoryId: serializer.fromJson(json['memoryId']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'assetId': serializer.toJson(assetId), + 'memoryId': serializer.toJson(memoryId), + }; + } + + MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => + MemoryAssetEntityData( + assetId: assetId ?? this.assetId, + memoryId: memoryId ?? this.memoryId, + ); + MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { + return MemoryAssetEntityData( + assetId: data.assetId.present ? data.assetId.value : this.assetId, + memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, + ); + } + + @override + String toString() { + return (StringBuffer('MemoryAssetEntityData(') + ..write('assetId: $assetId, ') + ..write('memoryId: $memoryId') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(assetId, memoryId); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is MemoryAssetEntityData && + other.assetId == this.assetId && + other.memoryId == this.memoryId); +} + +class MemoryAssetEntityCompanion + extends UpdateCompanion { + final Value assetId; + final Value memoryId; + const MemoryAssetEntityCompanion({ + this.assetId = const Value.absent(), + this.memoryId = const Value.absent(), + }); + MemoryAssetEntityCompanion.insert({ + required String assetId, + required String memoryId, + }) : assetId = Value(assetId), + memoryId = Value(memoryId); + static Insertable custom({ + Expression? assetId, + Expression? memoryId, + }) { + return RawValuesInsertable({ + if (assetId != null) 'asset_id': assetId, + if (memoryId != null) 'memory_id': memoryId, + }); + } + + MemoryAssetEntityCompanion copyWith({ + Value? assetId, + Value? memoryId, + }) { + return MemoryAssetEntityCompanion( + assetId: assetId ?? this.assetId, + memoryId: memoryId ?? this.memoryId, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (assetId.present) { + map['asset_id'] = Variable(assetId.value); + } + if (memoryId.present) { + map['memory_id'] = Variable(memoryId.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('MemoryAssetEntityCompanion(') + ..write('assetId: $assetId, ') + ..write('memoryId: $memoryId') + ..write(')')) + .toString(); + } +} + +class PersonEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + PersonEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn ownerId = GeneratedColumn( + 'owner_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES user_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn faceAssetId = GeneratedColumn( + 'face_asset_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn isFavorite = GeneratedColumn( + 'is_favorite', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_favorite" IN (0, 1))', + ), + ); + late final GeneratedColumn isHidden = GeneratedColumn( + 'is_hidden', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_hidden" IN (0, 1))', + ), + ); + late final GeneratedColumn color = GeneratedColumn( + 'color', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn birthDate = GeneratedColumn( + 'birth_date', + aliasedName, + true, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + ); + @override + List get $columns => [ + id, + createdAt, + updatedAt, + ownerId, + name, + faceAssetId, + isFavorite, + isHidden, + color, + birthDate, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'person_entity'; + @override + Set get $primaryKey => {id}; + @override + PersonEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return PersonEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + ownerId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}owner_id'], + )!, + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + faceAssetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}face_asset_id'], + ), + isFavorite: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_favorite'], + )!, + isHidden: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_hidden'], + )!, + color: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}color'], + ), + birthDate: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}birth_date'], + ), + ); + } + + @override + PersonEntity createAlias(String alias) { + return PersonEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class PersonEntityData extends DataClass + implements Insertable { + final String id; + final DateTime createdAt; + final DateTime updatedAt; + final String ownerId; + final String name; + final String? faceAssetId; + final bool isFavorite; + final bool isHidden; + final String? color; + final DateTime? birthDate; + const PersonEntityData({ + required this.id, + required this.createdAt, + required this.updatedAt, + required this.ownerId, + required this.name, + this.faceAssetId, + required this.isFavorite, + required this.isHidden, + this.color, + this.birthDate, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + map['owner_id'] = Variable(ownerId); + map['name'] = Variable(name); + if (!nullToAbsent || faceAssetId != null) { + map['face_asset_id'] = Variable(faceAssetId); + } + map['is_favorite'] = Variable(isFavorite); + map['is_hidden'] = Variable(isHidden); + if (!nullToAbsent || color != null) { + map['color'] = Variable(color); + } + if (!nullToAbsent || birthDate != null) { + map['birth_date'] = Variable(birthDate); + } + return map; + } + + factory PersonEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return PersonEntityData( + id: serializer.fromJson(json['id']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + ownerId: serializer.fromJson(json['ownerId']), + name: serializer.fromJson(json['name']), + faceAssetId: serializer.fromJson(json['faceAssetId']), + isFavorite: serializer.fromJson(json['isFavorite']), + isHidden: serializer.fromJson(json['isHidden']), + color: serializer.fromJson(json['color']), + birthDate: serializer.fromJson(json['birthDate']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'ownerId': serializer.toJson(ownerId), + 'name': serializer.toJson(name), + 'faceAssetId': serializer.toJson(faceAssetId), + 'isFavorite': serializer.toJson(isFavorite), + 'isHidden': serializer.toJson(isHidden), + 'color': serializer.toJson(color), + 'birthDate': serializer.toJson(birthDate), + }; + } + + PersonEntityData copyWith({ + String? id, + DateTime? createdAt, + DateTime? updatedAt, + String? ownerId, + String? name, + Value faceAssetId = const Value.absent(), + bool? isFavorite, + bool? isHidden, + Value color = const Value.absent(), + Value birthDate = const Value.absent(), + }) => PersonEntityData( + id: id ?? this.id, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ownerId: ownerId ?? this.ownerId, + name: name ?? this.name, + faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, + isFavorite: isFavorite ?? this.isFavorite, + isHidden: isHidden ?? this.isHidden, + color: color.present ? color.value : this.color, + birthDate: birthDate.present ? birthDate.value : this.birthDate, + ); + PersonEntityData copyWithCompanion(PersonEntityCompanion data) { + return PersonEntityData( + id: data.id.present ? data.id.value : this.id, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, + name: data.name.present ? data.name.value : this.name, + faceAssetId: data.faceAssetId.present + ? data.faceAssetId.value + : this.faceAssetId, + isFavorite: data.isFavorite.present + ? data.isFavorite.value + : this.isFavorite, + isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, + color: data.color.present ? data.color.value : this.color, + birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, + ); + } + + @override + String toString() { + return (StringBuffer('PersonEntityData(') + ..write('id: $id, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('ownerId: $ownerId, ') + ..write('name: $name, ') + ..write('faceAssetId: $faceAssetId, ') + ..write('isFavorite: $isFavorite, ') + ..write('isHidden: $isHidden, ') + ..write('color: $color, ') + ..write('birthDate: $birthDate') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + createdAt, + updatedAt, + ownerId, + name, + faceAssetId, + isFavorite, + isHidden, + color, + birthDate, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is PersonEntityData && + other.id == this.id && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.ownerId == this.ownerId && + other.name == this.name && + other.faceAssetId == this.faceAssetId && + other.isFavorite == this.isFavorite && + other.isHidden == this.isHidden && + other.color == this.color && + other.birthDate == this.birthDate); +} + +class PersonEntityCompanion extends UpdateCompanion { + final Value id; + final Value createdAt; + final Value updatedAt; + final Value ownerId; + final Value name; + final Value faceAssetId; + final Value isFavorite; + final Value isHidden; + final Value color; + final Value birthDate; + const PersonEntityCompanion({ + this.id = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.ownerId = const Value.absent(), + this.name = const Value.absent(), + this.faceAssetId = const Value.absent(), + this.isFavorite = const Value.absent(), + this.isHidden = const Value.absent(), + this.color = const Value.absent(), + this.birthDate = const Value.absent(), + }); + PersonEntityCompanion.insert({ + required String id, + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + required String ownerId, + required String name, + this.faceAssetId = const Value.absent(), + required bool isFavorite, + required bool isHidden, + this.color = const Value.absent(), + this.birthDate = const Value.absent(), + }) : id = Value(id), + ownerId = Value(ownerId), + name = Value(name), + isFavorite = Value(isFavorite), + isHidden = Value(isHidden); + static Insertable custom({ + Expression? id, + Expression? createdAt, + Expression? updatedAt, + Expression? ownerId, + Expression? name, + Expression? faceAssetId, + Expression? isFavorite, + Expression? isHidden, + Expression? color, + Expression? birthDate, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (ownerId != null) 'owner_id': ownerId, + if (name != null) 'name': name, + if (faceAssetId != null) 'face_asset_id': faceAssetId, + if (isFavorite != null) 'is_favorite': isFavorite, + if (isHidden != null) 'is_hidden': isHidden, + if (color != null) 'color': color, + if (birthDate != null) 'birth_date': birthDate, + }); + } + + PersonEntityCompanion copyWith({ + Value? id, + Value? createdAt, + Value? updatedAt, + Value? ownerId, + Value? name, + Value? faceAssetId, + Value? isFavorite, + Value? isHidden, + Value? color, + Value? birthDate, + }) { + return PersonEntityCompanion( + id: id ?? this.id, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + ownerId: ownerId ?? this.ownerId, + name: name ?? this.name, + faceAssetId: faceAssetId ?? this.faceAssetId, + isFavorite: isFavorite ?? this.isFavorite, + isHidden: isHidden ?? this.isHidden, + color: color ?? this.color, + birthDate: birthDate ?? this.birthDate, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (ownerId.present) { + map['owner_id'] = Variable(ownerId.value); + } + if (name.present) { + map['name'] = Variable(name.value); + } + if (faceAssetId.present) { + map['face_asset_id'] = Variable(faceAssetId.value); + } + if (isFavorite.present) { + map['is_favorite'] = Variable(isFavorite.value); + } + if (isHidden.present) { + map['is_hidden'] = Variable(isHidden.value); + } + if (color.present) { + map['color'] = Variable(color.value); + } + if (birthDate.present) { + map['birth_date'] = Variable(birthDate.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('PersonEntityCompanion(') + ..write('id: $id, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('ownerId: $ownerId, ') + ..write('name: $name, ') + ..write('faceAssetId: $faceAssetId, ') + ..write('isFavorite: $isFavorite, ') + ..write('isHidden: $isHidden, ') + ..write('color: $color, ') + ..write('birthDate: $birthDate') + ..write(')')) + .toString(); + } +} + +class AssetFaceEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + AssetFaceEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn assetId = GeneratedColumn( + 'asset_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES remote_asset_entity (id) ON DELETE CASCADE', + ), + ); + late final GeneratedColumn personId = GeneratedColumn( + 'person_id', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'REFERENCES person_entity (id) ON DELETE SET NULL', + ), + ); + late final GeneratedColumn imageWidth = GeneratedColumn( + 'image_width', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn imageHeight = GeneratedColumn( + 'image_height', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn boundingBoxX1 = GeneratedColumn( + 'bounding_box_x1', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn boundingBoxY1 = GeneratedColumn( + 'bounding_box_y1', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn boundingBoxX2 = GeneratedColumn( + 'bounding_box_x2', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn boundingBoxY2 = GeneratedColumn( + 'bounding_box_y2', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn sourceType = GeneratedColumn( + 'source_type', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + @override + List get $columns => [ + id, + assetId, + personId, + imageWidth, + imageHeight, + boundingBoxX1, + boundingBoxY1, + boundingBoxX2, + boundingBoxY2, + sourceType, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'asset_face_entity'; + @override + Set get $primaryKey => {id}; + @override + AssetFaceEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return AssetFaceEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + assetId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}asset_id'], + )!, + personId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}person_id'], + ), + imageWidth: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}image_width'], + )!, + imageHeight: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}image_height'], + )!, + boundingBoxX1: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}bounding_box_x1'], + )!, + boundingBoxY1: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}bounding_box_y1'], + )!, + boundingBoxX2: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}bounding_box_x2'], + )!, + boundingBoxY2: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}bounding_box_y2'], + )!, + sourceType: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}source_type'], + )!, + ); + } + + @override + AssetFaceEntity createAlias(String alias) { + return AssetFaceEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class AssetFaceEntityData extends DataClass + implements Insertable { + final String id; + final String assetId; + final String? personId; + final int imageWidth; + final int imageHeight; + final int boundingBoxX1; + final int boundingBoxY1; + final int boundingBoxX2; + final int boundingBoxY2; + final String sourceType; + const AssetFaceEntityData({ + required this.id, + required this.assetId, + this.personId, + required this.imageWidth, + required this.imageHeight, + required this.boundingBoxX1, + required this.boundingBoxY1, + required this.boundingBoxX2, + required this.boundingBoxY2, + required this.sourceType, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + map['asset_id'] = Variable(assetId); + if (!nullToAbsent || personId != null) { + map['person_id'] = Variable(personId); + } + map['image_width'] = Variable(imageWidth); + map['image_height'] = Variable(imageHeight); + map['bounding_box_x1'] = Variable(boundingBoxX1); + map['bounding_box_y1'] = Variable(boundingBoxY1); + map['bounding_box_x2'] = Variable(boundingBoxX2); + map['bounding_box_y2'] = Variable(boundingBoxY2); + map['source_type'] = Variable(sourceType); + return map; + } + + factory AssetFaceEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return AssetFaceEntityData( + id: serializer.fromJson(json['id']), + assetId: serializer.fromJson(json['assetId']), + personId: serializer.fromJson(json['personId']), + imageWidth: serializer.fromJson(json['imageWidth']), + imageHeight: serializer.fromJson(json['imageHeight']), + boundingBoxX1: serializer.fromJson(json['boundingBoxX1']), + boundingBoxY1: serializer.fromJson(json['boundingBoxY1']), + boundingBoxX2: serializer.fromJson(json['boundingBoxX2']), + boundingBoxY2: serializer.fromJson(json['boundingBoxY2']), + sourceType: serializer.fromJson(json['sourceType']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'assetId': serializer.toJson(assetId), + 'personId': serializer.toJson(personId), + 'imageWidth': serializer.toJson(imageWidth), + 'imageHeight': serializer.toJson(imageHeight), + 'boundingBoxX1': serializer.toJson(boundingBoxX1), + 'boundingBoxY1': serializer.toJson(boundingBoxY1), + 'boundingBoxX2': serializer.toJson(boundingBoxX2), + 'boundingBoxY2': serializer.toJson(boundingBoxY2), + 'sourceType': serializer.toJson(sourceType), + }; + } + + AssetFaceEntityData copyWith({ + String? id, + String? assetId, + Value personId = const Value.absent(), + int? imageWidth, + int? imageHeight, + int? boundingBoxX1, + int? boundingBoxY1, + int? boundingBoxX2, + int? boundingBoxY2, + String? sourceType, + }) => AssetFaceEntityData( + id: id ?? this.id, + assetId: assetId ?? this.assetId, + personId: personId.present ? personId.value : this.personId, + imageWidth: imageWidth ?? this.imageWidth, + imageHeight: imageHeight ?? this.imageHeight, + boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, + boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, + boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, + boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, + sourceType: sourceType ?? this.sourceType, + ); + AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) { + return AssetFaceEntityData( + id: data.id.present ? data.id.value : this.id, + assetId: data.assetId.present ? data.assetId.value : this.assetId, + personId: data.personId.present ? data.personId.value : this.personId, + imageWidth: data.imageWidth.present + ? data.imageWidth.value + : this.imageWidth, + imageHeight: data.imageHeight.present + ? data.imageHeight.value + : this.imageHeight, + boundingBoxX1: data.boundingBoxX1.present + ? data.boundingBoxX1.value + : this.boundingBoxX1, + boundingBoxY1: data.boundingBoxY1.present + ? data.boundingBoxY1.value + : this.boundingBoxY1, + boundingBoxX2: data.boundingBoxX2.present + ? data.boundingBoxX2.value + : this.boundingBoxX2, + boundingBoxY2: data.boundingBoxY2.present + ? data.boundingBoxY2.value + : this.boundingBoxY2, + sourceType: data.sourceType.present + ? data.sourceType.value + : this.sourceType, + ); + } + + @override + String toString() { + return (StringBuffer('AssetFaceEntityData(') + ..write('id: $id, ') + ..write('assetId: $assetId, ') + ..write('personId: $personId, ') + ..write('imageWidth: $imageWidth, ') + ..write('imageHeight: $imageHeight, ') + ..write('boundingBoxX1: $boundingBoxX1, ') + ..write('boundingBoxY1: $boundingBoxY1, ') + ..write('boundingBoxX2: $boundingBoxX2, ') + ..write('boundingBoxY2: $boundingBoxY2, ') + ..write('sourceType: $sourceType') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + id, + assetId, + personId, + imageWidth, + imageHeight, + boundingBoxX1, + boundingBoxY1, + boundingBoxX2, + boundingBoxY2, + sourceType, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is AssetFaceEntityData && + other.id == this.id && + other.assetId == this.assetId && + other.personId == this.personId && + other.imageWidth == this.imageWidth && + other.imageHeight == this.imageHeight && + other.boundingBoxX1 == this.boundingBoxX1 && + other.boundingBoxY1 == this.boundingBoxY1 && + other.boundingBoxX2 == this.boundingBoxX2 && + other.boundingBoxY2 == this.boundingBoxY2 && + other.sourceType == this.sourceType); +} + +class AssetFaceEntityCompanion extends UpdateCompanion { + final Value id; + final Value assetId; + final Value personId; + final Value imageWidth; + final Value imageHeight; + final Value boundingBoxX1; + final Value boundingBoxY1; + final Value boundingBoxX2; + final Value boundingBoxY2; + final Value sourceType; + const AssetFaceEntityCompanion({ + this.id = const Value.absent(), + this.assetId = const Value.absent(), + this.personId = const Value.absent(), + this.imageWidth = const Value.absent(), + this.imageHeight = const Value.absent(), + this.boundingBoxX1 = const Value.absent(), + this.boundingBoxY1 = const Value.absent(), + this.boundingBoxX2 = const Value.absent(), + this.boundingBoxY2 = const Value.absent(), + this.sourceType = const Value.absent(), + }); + AssetFaceEntityCompanion.insert({ + required String id, + required String assetId, + this.personId = const Value.absent(), + required int imageWidth, + required int imageHeight, + required int boundingBoxX1, + required int boundingBoxY1, + required int boundingBoxX2, + required int boundingBoxY2, + required String sourceType, + }) : id = Value(id), + assetId = Value(assetId), + imageWidth = Value(imageWidth), + imageHeight = Value(imageHeight), + boundingBoxX1 = Value(boundingBoxX1), + boundingBoxY1 = Value(boundingBoxY1), + boundingBoxX2 = Value(boundingBoxX2), + boundingBoxY2 = Value(boundingBoxY2), + sourceType = Value(sourceType); + static Insertable custom({ + Expression? id, + Expression? assetId, + Expression? personId, + Expression? imageWidth, + Expression? imageHeight, + Expression? boundingBoxX1, + Expression? boundingBoxY1, + Expression? boundingBoxX2, + Expression? boundingBoxY2, + Expression? sourceType, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (assetId != null) 'asset_id': assetId, + if (personId != null) 'person_id': personId, + if (imageWidth != null) 'image_width': imageWidth, + if (imageHeight != null) 'image_height': imageHeight, + if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1, + if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1, + if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2, + if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2, + if (sourceType != null) 'source_type': sourceType, + }); + } + + AssetFaceEntityCompanion copyWith({ + Value? id, + Value? assetId, + Value? personId, + Value? imageWidth, + Value? imageHeight, + Value? boundingBoxX1, + Value? boundingBoxY1, + Value? boundingBoxX2, + Value? boundingBoxY2, + Value? sourceType, + }) { + return AssetFaceEntityCompanion( + id: id ?? this.id, + assetId: assetId ?? this.assetId, + personId: personId ?? this.personId, + imageWidth: imageWidth ?? this.imageWidth, + imageHeight: imageHeight ?? this.imageHeight, + boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1, + boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1, + boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2, + boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2, + sourceType: sourceType ?? this.sourceType, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (assetId.present) { + map['asset_id'] = Variable(assetId.value); + } + if (personId.present) { + map['person_id'] = Variable(personId.value); + } + if (imageWidth.present) { + map['image_width'] = Variable(imageWidth.value); + } + if (imageHeight.present) { + map['image_height'] = Variable(imageHeight.value); + } + if (boundingBoxX1.present) { + map['bounding_box_x1'] = Variable(boundingBoxX1.value); + } + if (boundingBoxY1.present) { + map['bounding_box_y1'] = Variable(boundingBoxY1.value); + } + if (boundingBoxX2.present) { + map['bounding_box_x2'] = Variable(boundingBoxX2.value); + } + if (boundingBoxY2.present) { + map['bounding_box_y2'] = Variable(boundingBoxY2.value); + } + if (sourceType.present) { + map['source_type'] = Variable(sourceType.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('AssetFaceEntityCompanion(') + ..write('id: $id, ') + ..write('assetId: $assetId, ') + ..write('personId: $personId, ') + ..write('imageWidth: $imageWidth, ') + ..write('imageHeight: $imageHeight, ') + ..write('boundingBoxX1: $boundingBoxX1, ') + ..write('boundingBoxY1: $boundingBoxY1, ') + ..write('boundingBoxX2: $boundingBoxX2, ') + ..write('boundingBoxY2: $boundingBoxY2, ') + ..write('sourceType: $sourceType') + ..write(')')) + .toString(); + } +} + +class StoreEntity extends Table with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + StoreEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn stringValue = GeneratedColumn( + 'string_value', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn intValue = GeneratedColumn( + 'int_value', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + @override + List get $columns => [id, stringValue, intValue]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'store_entity'; + @override + Set get $primaryKey => {id}; + @override + StoreEntityData map(Map data, {String? tablePrefix}) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return StoreEntityData( + id: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}id'], + )!, + stringValue: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}string_value'], + ), + intValue: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}int_value'], + ), + ); + } + + @override + StoreEntity createAlias(String alias) { + return StoreEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class StoreEntityData extends DataClass implements Insertable { + final int id; + final String? stringValue; + final int? intValue; + const StoreEntityData({required this.id, this.stringValue, this.intValue}); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['id'] = Variable(id); + if (!nullToAbsent || stringValue != null) { + map['string_value'] = Variable(stringValue); + } + if (!nullToAbsent || intValue != null) { + map['int_value'] = Variable(intValue); + } + return map; + } + + factory StoreEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return StoreEntityData( + id: serializer.fromJson(json['id']), + stringValue: serializer.fromJson(json['stringValue']), + intValue: serializer.fromJson(json['intValue']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'id': serializer.toJson(id), + 'stringValue': serializer.toJson(stringValue), + 'intValue': serializer.toJson(intValue), + }; + } + + StoreEntityData copyWith({ + int? id, + Value stringValue = const Value.absent(), + Value intValue = const Value.absent(), + }) => StoreEntityData( + id: id ?? this.id, + stringValue: stringValue.present ? stringValue.value : this.stringValue, + intValue: intValue.present ? intValue.value : this.intValue, + ); + StoreEntityData copyWithCompanion(StoreEntityCompanion data) { + return StoreEntityData( + id: data.id.present ? data.id.value : this.id, + stringValue: data.stringValue.present + ? data.stringValue.value + : this.stringValue, + intValue: data.intValue.present ? data.intValue.value : this.intValue, + ); + } + + @override + String toString() { + return (StringBuffer('StoreEntityData(') + ..write('id: $id, ') + ..write('stringValue: $stringValue, ') + ..write('intValue: $intValue') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash(id, stringValue, intValue); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is StoreEntityData && + other.id == this.id && + other.stringValue == this.stringValue && + other.intValue == this.intValue); +} + +class StoreEntityCompanion extends UpdateCompanion { + final Value id; + final Value stringValue; + final Value intValue; + const StoreEntityCompanion({ + this.id = const Value.absent(), + this.stringValue = const Value.absent(), + this.intValue = const Value.absent(), + }); + StoreEntityCompanion.insert({ + required int id, + this.stringValue = const Value.absent(), + this.intValue = const Value.absent(), + }) : id = Value(id); + static Insertable custom({ + Expression? id, + Expression? stringValue, + Expression? intValue, + }) { + return RawValuesInsertable({ + if (id != null) 'id': id, + if (stringValue != null) 'string_value': stringValue, + if (intValue != null) 'int_value': intValue, + }); + } + + StoreEntityCompanion copyWith({ + Value? id, + Value? stringValue, + Value? intValue, + }) { + return StoreEntityCompanion( + id: id ?? this.id, + stringValue: stringValue ?? this.stringValue, + intValue: intValue ?? this.intValue, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (id.present) { + map['id'] = Variable(id.value); + } + if (stringValue.present) { + map['string_value'] = Variable(stringValue.value); + } + if (intValue.present) { + map['int_value'] = Variable(intValue.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('StoreEntityCompanion(') + ..write('id: $id, ') + ..write('stringValue: $stringValue, ') + ..write('intValue: $intValue') + ..write(')')) + .toString(); + } +} + +class TrashedLocalAssetEntity extends Table + with TableInfo { + @override + final GeneratedDatabase attachedDatabase; + final String? _alias; + TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]); + late final GeneratedColumn name = GeneratedColumn( + 'name', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn type = GeneratedColumn( + 'type', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: true, + ); + late final GeneratedColumn createdAt = GeneratedColumn( + 'created_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn updatedAt = GeneratedColumn( + 'updated_at', + aliasedName, + false, + type: DriftSqlType.dateTime, + requiredDuringInsert: false, + defaultValue: const CustomExpression('CURRENT_TIMESTAMP'), + ); + late final GeneratedColumn width = GeneratedColumn( + 'width', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn height = GeneratedColumn( + 'height', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn durationInSeconds = GeneratedColumn( + 'duration_in_seconds', + aliasedName, + true, + type: DriftSqlType.int, + requiredDuringInsert: false, + ); + late final GeneratedColumn id = GeneratedColumn( + 'id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn albumId = GeneratedColumn( + 'album_id', + aliasedName, + false, + type: DriftSqlType.string, + requiredDuringInsert: true, + ); + late final GeneratedColumn checksum = GeneratedColumn( + 'checksum', + aliasedName, + true, + type: DriftSqlType.string, + requiredDuringInsert: false, + ); + late final GeneratedColumn isFavorite = GeneratedColumn( + 'is_favorite', + aliasedName, + false, + type: DriftSqlType.bool, + requiredDuringInsert: false, + defaultConstraints: GeneratedColumn.constraintIsAlways( + 'CHECK ("is_favorite" IN (0, 1))', + ), + defaultValue: const CustomExpression('0'), + ); + late final GeneratedColumn orientation = GeneratedColumn( + 'orientation', + aliasedName, + false, + type: DriftSqlType.int, + requiredDuringInsert: false, + defaultValue: const CustomExpression('0'), + ); + @override + List get $columns => [ + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + albumId, + checksum, + isFavorite, + orientation, + ]; + @override + String get aliasedName => _alias ?? actualTableName; + @override + String get actualTableName => $name; + static const String $name = 'trashed_local_asset_entity'; + @override + Set get $primaryKey => {id, albumId}; + @override + TrashedLocalAssetEntityData map( + Map data, { + String? tablePrefix, + }) { + final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; + return TrashedLocalAssetEntityData( + name: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}name'], + )!, + type: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}type'], + )!, + createdAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}created_at'], + )!, + updatedAt: attachedDatabase.typeMapping.read( + DriftSqlType.dateTime, + data['${effectivePrefix}updated_at'], + )!, + width: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}width'], + ), + height: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}height'], + ), + durationInSeconds: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}duration_in_seconds'], + ), + id: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}id'], + )!, + albumId: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}album_id'], + )!, + checksum: attachedDatabase.typeMapping.read( + DriftSqlType.string, + data['${effectivePrefix}checksum'], + ), + isFavorite: attachedDatabase.typeMapping.read( + DriftSqlType.bool, + data['${effectivePrefix}is_favorite'], + )!, + orientation: attachedDatabase.typeMapping.read( + DriftSqlType.int, + data['${effectivePrefix}orientation'], + )!, + ); + } + + @override + TrashedLocalAssetEntity createAlias(String alias) { + return TrashedLocalAssetEntity(attachedDatabase, alias); + } + + @override + bool get withoutRowId => true; + @override + bool get isStrict => true; +} + +class TrashedLocalAssetEntityData extends DataClass + implements Insertable { + final String name; + final int type; + final DateTime createdAt; + final DateTime updatedAt; + final int? width; + final int? height; + final int? durationInSeconds; + final String id; + final String albumId; + final String? checksum; + final bool isFavorite; + final int orientation; + const TrashedLocalAssetEntityData({ + required this.name, + required this.type, + required this.createdAt, + required this.updatedAt, + this.width, + this.height, + this.durationInSeconds, + required this.id, + required this.albumId, + this.checksum, + required this.isFavorite, + required this.orientation, + }); + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + map['name'] = Variable(name); + map['type'] = Variable(type); + map['created_at'] = Variable(createdAt); + map['updated_at'] = Variable(updatedAt); + if (!nullToAbsent || width != null) { + map['width'] = Variable(width); + } + if (!nullToAbsent || height != null) { + map['height'] = Variable(height); + } + if (!nullToAbsent || durationInSeconds != null) { + map['duration_in_seconds'] = Variable(durationInSeconds); + } + map['id'] = Variable(id); + map['album_id'] = Variable(albumId); + if (!nullToAbsent || checksum != null) { + map['checksum'] = Variable(checksum); + } + map['is_favorite'] = Variable(isFavorite); + map['orientation'] = Variable(orientation); + return map; + } + + factory TrashedLocalAssetEntityData.fromJson( + Map json, { + ValueSerializer? serializer, + }) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return TrashedLocalAssetEntityData( + name: serializer.fromJson(json['name']), + type: serializer.fromJson(json['type']), + createdAt: serializer.fromJson(json['createdAt']), + updatedAt: serializer.fromJson(json['updatedAt']), + width: serializer.fromJson(json['width']), + height: serializer.fromJson(json['height']), + durationInSeconds: serializer.fromJson(json['durationInSeconds']), + id: serializer.fromJson(json['id']), + albumId: serializer.fromJson(json['albumId']), + checksum: serializer.fromJson(json['checksum']), + isFavorite: serializer.fromJson(json['isFavorite']), + orientation: serializer.fromJson(json['orientation']), + ); + } + @override + Map toJson({ValueSerializer? serializer}) { + serializer ??= driftRuntimeOptions.defaultSerializer; + return { + 'name': serializer.toJson(name), + 'type': serializer.toJson(type), + 'createdAt': serializer.toJson(createdAt), + 'updatedAt': serializer.toJson(updatedAt), + 'width': serializer.toJson(width), + 'height': serializer.toJson(height), + 'durationInSeconds': serializer.toJson(durationInSeconds), + 'id': serializer.toJson(id), + 'albumId': serializer.toJson(albumId), + 'checksum': serializer.toJson(checksum), + 'isFavorite': serializer.toJson(isFavorite), + 'orientation': serializer.toJson(orientation), + }; + } + + TrashedLocalAssetEntityData copyWith({ + String? name, + int? type, + DateTime? createdAt, + DateTime? updatedAt, + Value width = const Value.absent(), + Value height = const Value.absent(), + Value durationInSeconds = const Value.absent(), + String? id, + String? albumId, + Value checksum = const Value.absent(), + bool? isFavorite, + int? orientation, + }) => TrashedLocalAssetEntityData( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width.present ? width.value : this.width, + height: height.present ? height.value : this.height, + durationInSeconds: durationInSeconds.present + ? durationInSeconds.value + : this.durationInSeconds, + id: id ?? this.id, + albumId: albumId ?? this.albumId, + checksum: checksum.present ? checksum.value : this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + orientation: orientation ?? this.orientation, + ); + TrashedLocalAssetEntityData copyWithCompanion( + TrashedLocalAssetEntityCompanion data, + ) { + return TrashedLocalAssetEntityData( + name: data.name.present ? data.name.value : this.name, + type: data.type.present ? data.type.value : this.type, + createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, + updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, + width: data.width.present ? data.width.value : this.width, + height: data.height.present ? data.height.value : this.height, + durationInSeconds: data.durationInSeconds.present + ? data.durationInSeconds.value + : this.durationInSeconds, + id: data.id.present ? data.id.value : this.id, + albumId: data.albumId.present ? data.albumId.value : this.albumId, + checksum: data.checksum.present ? data.checksum.value : this.checksum, + isFavorite: data.isFavorite.present + ? data.isFavorite.value + : this.isFavorite, + orientation: data.orientation.present + ? data.orientation.value + : this.orientation, + ); + } + + @override + String toString() { + return (StringBuffer('TrashedLocalAssetEntityData(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('albumId: $albumId, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('orientation: $orientation') + ..write(')')) + .toString(); + } + + @override + int get hashCode => Object.hash( + name, + type, + createdAt, + updatedAt, + width, + height, + durationInSeconds, + id, + albumId, + checksum, + isFavorite, + orientation, + ); + @override + bool operator ==(Object other) => + identical(this, other) || + (other is TrashedLocalAssetEntityData && + other.name == this.name && + other.type == this.type && + other.createdAt == this.createdAt && + other.updatedAt == this.updatedAt && + other.width == this.width && + other.height == this.height && + other.durationInSeconds == this.durationInSeconds && + other.id == this.id && + other.albumId == this.albumId && + other.checksum == this.checksum && + other.isFavorite == this.isFavorite && + other.orientation == this.orientation); +} + +class TrashedLocalAssetEntityCompanion + extends UpdateCompanion { + final Value name; + final Value type; + final Value createdAt; + final Value updatedAt; + final Value width; + final Value height; + final Value durationInSeconds; + final Value id; + final Value albumId; + final Value checksum; + final Value isFavorite; + final Value orientation; + const TrashedLocalAssetEntityCompanion({ + this.name = const Value.absent(), + this.type = const Value.absent(), + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.width = const Value.absent(), + this.height = const Value.absent(), + this.durationInSeconds = const Value.absent(), + this.id = const Value.absent(), + this.albumId = const Value.absent(), + this.checksum = const Value.absent(), + this.isFavorite = const Value.absent(), + this.orientation = const Value.absent(), + }); + TrashedLocalAssetEntityCompanion.insert({ + required String name, + required int type, + this.createdAt = const Value.absent(), + this.updatedAt = const Value.absent(), + this.width = const Value.absent(), + this.height = const Value.absent(), + this.durationInSeconds = const Value.absent(), + required String id, + required String albumId, + this.checksum = const Value.absent(), + this.isFavorite = const Value.absent(), + this.orientation = const Value.absent(), + }) : name = Value(name), + type = Value(type), + id = Value(id), + albumId = Value(albumId); + static Insertable custom({ + Expression? name, + Expression? type, + Expression? createdAt, + Expression? updatedAt, + Expression? width, + Expression? height, + Expression? durationInSeconds, + Expression? id, + Expression? albumId, + Expression? checksum, + Expression? isFavorite, + Expression? orientation, + }) { + return RawValuesInsertable({ + if (name != null) 'name': name, + if (type != null) 'type': type, + if (createdAt != null) 'created_at': createdAt, + if (updatedAt != null) 'updated_at': updatedAt, + if (width != null) 'width': width, + if (height != null) 'height': height, + if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, + if (id != null) 'id': id, + if (albumId != null) 'album_id': albumId, + if (checksum != null) 'checksum': checksum, + if (isFavorite != null) 'is_favorite': isFavorite, + if (orientation != null) 'orientation': orientation, + }); + } + + TrashedLocalAssetEntityCompanion copyWith({ + Value? name, + Value? type, + Value? createdAt, + Value? updatedAt, + Value? width, + Value? height, + Value? durationInSeconds, + Value? id, + Value? albumId, + Value? checksum, + Value? isFavorite, + Value? orientation, + }) { + return TrashedLocalAssetEntityCompanion( + name: name ?? this.name, + type: type ?? this.type, + createdAt: createdAt ?? this.createdAt, + updatedAt: updatedAt ?? this.updatedAt, + width: width ?? this.width, + height: height ?? this.height, + durationInSeconds: durationInSeconds ?? this.durationInSeconds, + id: id ?? this.id, + albumId: albumId ?? this.albumId, + checksum: checksum ?? this.checksum, + isFavorite: isFavorite ?? this.isFavorite, + orientation: orientation ?? this.orientation, + ); + } + + @override + Map toColumns(bool nullToAbsent) { + final map = {}; + if (name.present) { + map['name'] = Variable(name.value); + } + if (type.present) { + map['type'] = Variable(type.value); + } + if (createdAt.present) { + map['created_at'] = Variable(createdAt.value); + } + if (updatedAt.present) { + map['updated_at'] = Variable(updatedAt.value); + } + if (width.present) { + map['width'] = Variable(width.value); + } + if (height.present) { + map['height'] = Variable(height.value); + } + if (durationInSeconds.present) { + map['duration_in_seconds'] = Variable(durationInSeconds.value); + } + if (id.present) { + map['id'] = Variable(id.value); + } + if (albumId.present) { + map['album_id'] = Variable(albumId.value); + } + if (checksum.present) { + map['checksum'] = Variable(checksum.value); + } + if (isFavorite.present) { + map['is_favorite'] = Variable(isFavorite.value); + } + if (orientation.present) { + map['orientation'] = Variable(orientation.value); + } + return map; + } + + @override + String toString() { + return (StringBuffer('TrashedLocalAssetEntityCompanion(') + ..write('name: $name, ') + ..write('type: $type, ') + ..write('createdAt: $createdAt, ') + ..write('updatedAt: $updatedAt, ') + ..write('width: $width, ') + ..write('height: $height, ') + ..write('durationInSeconds: $durationInSeconds, ') + ..write('id: $id, ') + ..write('albumId: $albumId, ') + ..write('checksum: $checksum, ') + ..write('isFavorite: $isFavorite, ') + ..write('orientation: $orientation') + ..write(')')) + .toString(); + } +} + +class DatabaseAtV13 extends GeneratedDatabase { + DatabaseAtV13(QueryExecutor e) : super(e); + late final UserEntity userEntity = UserEntity(this); + late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); + late final StackEntity stackEntity = StackEntity(this); + late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); + late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); + late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); + late final LocalAlbumAssetEntity localAlbumAssetEntity = + LocalAlbumAssetEntity(this); + late final Index idxLocalAssetChecksum = Index( + 'idx_local_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)', + ); + late final Index idxRemoteAssetOwnerChecksum = Index( + 'idx_remote_asset_owner_checksum', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)', + ); + late final Index uQRemoteAssetsOwnerChecksum = Index( + 'UQ_remote_assets_owner_checksum', + 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)', + ); + late final Index uQRemoteAssetsOwnerLibraryChecksum = Index( + 'UQ_remote_assets_owner_library_checksum', + 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)', + ); + late final Index idxRemoteAssetChecksum = Index( + 'idx_remote_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)', + ); + late final AuthUserEntity authUserEntity = AuthUserEntity(this); + late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); + late final PartnerEntity partnerEntity = PartnerEntity(this); + late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); + late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = + RemoteAlbumAssetEntity(this); + late final RemoteAlbumUserEntity remoteAlbumUserEntity = + RemoteAlbumUserEntity(this); + late final MemoryEntity memoryEntity = MemoryEntity(this); + late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); + late final PersonEntity personEntity = PersonEntity(this); + late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this); + late final StoreEntity storeEntity = StoreEntity(this); + late final TrashedLocalAssetEntity trashedLocalAssetEntity = + TrashedLocalAssetEntity(this); + late final Index idxLatLng = Index( + 'idx_lat_lng', + 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)', + ); + late final Index idxTrashedLocalAssetChecksum = Index( + 'idx_trashed_local_asset_checksum', + 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)', + ); + late final Index idxTrashedLocalAssetAlbum = Index( + 'idx_trashed_local_asset_album', + 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)', + ); + @override + Iterable> get allTables => + allSchemaEntities.whereType>(); + @override + List get allSchemaEntities => [ + userEntity, + remoteAssetEntity, + stackEntity, + localAssetEntity, + remoteAlbumEntity, + localAlbumEntity, + localAlbumAssetEntity, + idxLocalAssetChecksum, + idxRemoteAssetOwnerChecksum, + uQRemoteAssetsOwnerChecksum, + uQRemoteAssetsOwnerLibraryChecksum, + idxRemoteAssetChecksum, + authUserEntity, + userMetadataEntity, + partnerEntity, + remoteExifEntity, + remoteAlbumAssetEntity, + remoteAlbumUserEntity, + memoryEntity, + memoryAssetEntity, + personEntity, + assetFaceEntity, + storeEntity, + trashedLocalAssetEntity, + idxLatLng, + idxTrashedLocalAssetChecksum, + idxTrashedLocalAssetAlbum, + ]; + @override + int get schemaVersion => 13; + @override + DriftDatabaseOptions get options => + const DriftDatabaseOptions(storeDateTimeAsText: true); +} diff --git a/mobile/test/fixtures/sync_stream.stub.dart b/mobile/test/fixtures/sync_stream.stub.dart index 23c750d6d9..523984f966 100644 --- a/mobile/test/fixtures/sync_stream.stub.dart +++ b/mobile/test/fixtures/sync_stream.stub.dart @@ -81,4 +81,67 @@ abstract final class SyncStreamStub { data: SyncMemoryAssetDeleteV1(assetId: "asset-2", memoryId: "memory-1"), ack: "8", ); + + static final assetDeleteV1 = SyncEvent( + type: SyncEntityType.assetDeleteV1, + data: SyncAssetDeleteV1(assetId: "remote-asset"), + ack: "asset-delete-ack", + ); + + static SyncEvent assetTrashed({ + required String id, + required String checksum, + required String ack, + DateTime? trashedAt, + }) { + return _assetV1( + id: id, + checksum: checksum, + deletedAt: trashedAt ?? DateTime(2025, 1, 1), + ack: ack, + ); + } + + static SyncEvent assetModified({ + required String id, + required String checksum, + required String ack, + }) { + return _assetV1( + id: id, + checksum: checksum, + deletedAt: null, + ack: ack, + ); + } + + static SyncEvent _assetV1({ + required String id, + required String checksum, + required DateTime? deletedAt, + required String ack, + }) { + return SyncEvent( + type: SyncEntityType.assetV1, + data: SyncAssetV1( + checksum: checksum, + deletedAt: deletedAt, + duration: '0', + fileCreatedAt: DateTime(2025), + fileModifiedAt: DateTime(2025, 1, 2), + id: id, + isFavorite: false, + libraryId: null, + livePhotoVideoId: null, + localDateTime: DateTime(2025, 1, 3), + originalFileName: '$id.jpg', + ownerId: 'owner', + stackId: null, + thumbhash: null, + type: AssetTypeEnum.IMAGE, + visibility: AssetVisibility.timeline, + ), + ack: ack, + ); + } } diff --git a/mobile/test/infrastructure/repository.mock.dart b/mobile/test/infrastructure/repository.mock.dart index 44e756e88e..becfafe33d 100644 --- a/mobile/test/infrastructure/repository.mock.dart +++ b/mobile/test/infrastructure/repository.mock.dart @@ -8,6 +8,7 @@ import 'package:immich_mobile/infrastructure/repositories/storage.repository.dar import 'package:immich_mobile/infrastructure/repositories/store.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_api.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/sync_stream.repository.dart'; +import 'package:immich_mobile/infrastructure/repositories/trashed_local_asset.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/user.repository.dart'; import 'package:immich_mobile/infrastructure/repositories/user_api.repository.dart'; import 'package:immich_mobile/repositories/drift_album_api_repository.dart'; @@ -34,6 +35,8 @@ class MockLocalAssetRepository extends Mock implements DriftLocalAssetRepository class MockDriftLocalAssetRepository extends Mock implements DriftLocalAssetRepository {} +class MockTrashedLocalAssetRepository extends Mock implements DriftTrashedLocalAssetRepository {} + class MockStorageRepository extends Mock implements StorageRepository {} class MockDriftBackupRepository extends Mock implements DriftBackupRepository {} diff --git a/mobile/test/mocks/asset_entity.mock.dart b/mobile/test/mocks/asset_entity.mock.dart new file mode 100644 index 0000000000..fdea58315d --- /dev/null +++ b/mobile/test/mocks/asset_entity.mock.dart @@ -0,0 +1,4 @@ +import 'package:mocktail/mocktail.dart'; +import 'package:photo_manager/photo_manager.dart'; + +class MockAssetEntity extends Mock implements AssetEntity {} diff --git a/mobile/test/modules/activity/activity_provider_test.dart b/mobile/test/modules/activity/activity_provider_test.dart index 7964b43cad..84eba62b70 100644 --- a/mobile/test/modules/activity/activity_provider_test.dart +++ b/mobile/test/modules/activity/activity_provider_test.dart @@ -33,6 +33,7 @@ final _activities = [ void main() { late ActivityServiceMock activityMock; late ActivityStatisticsMock activityStatisticsMock; + late ActivityStatisticsMock albumActivityStatisticsMock; late ProviderContainer container; late AlbumActivityProvider provider; late ListenerMock>> listener; @@ -44,17 +45,23 @@ void main() { setUp(() async { activityMock = ActivityServiceMock(); activityStatisticsMock = ActivityStatisticsMock(); + albumActivityStatisticsMock = ActivityStatisticsMock(); + container = TestUtils.createContainer( overrides: [ activityServiceProvider.overrideWith((ref) => activityMock), activityStatisticsProvider('test-album', 'test-asset').overrideWith(() => activityStatisticsMock), + activityStatisticsProvider('test-album').overrideWith(() => albumActivityStatisticsMock), ], ); // Mock values + when(() => activityStatisticsMock.build(any(), any())).thenReturn(0); + when(() => albumActivityStatisticsMock.build(any())).thenReturn(0); when( () => activityMock.getAllActivities('test-album', assetId: 'test-asset'), ).thenAnswer((_) async => [..._activities]); + when(() => activityMock.getAllActivities('test-album')).thenAnswer((_) async => [..._activities]); // Init and wait for providers future to complete provider = albumActivityProvider('test-album', 'test-asset'); @@ -89,6 +96,10 @@ void main() { () => activityMock.addActivity('test-album', ActivityType.like, assetId: 'test-asset'), ).thenAnswer((_) async => AsyncData(like)); + final albumProvider = albumActivityProvider('test-album'); + container.read(albumProvider.notifier); + await container.read(albumProvider.future); + await container.read(provider.notifier).addLike(); verify(() => activityMock.addActivity('test-album', ActivityType.like, assetId: 'test-asset')); @@ -99,6 +110,11 @@ void main() { // Never bump activity count for new likes verifyNever(() => activityStatisticsMock.addActivity()); + verifyNever(() => albumActivityStatisticsMock.addActivity()); + + final albumActivities = container.read(albumProvider).requireValue; + expect(albumActivities, hasLength(5)); + expect(albumActivities, contains(like)); }); test('Like failed', () async { @@ -107,6 +123,10 @@ void main() { () => activityMock.addActivity('test-album', ActivityType.like, assetId: 'test-asset'), ).thenAnswer((_) async => AsyncError(Exception('Mock'), StackTrace.current)); + final albumProvider = albumActivityProvider('test-album'); + container.read(albumProvider.notifier); + await container.read(albumProvider.future); + await container.read(provider.notifier).addLike(); verify(() => activityMock.addActivity('test-album', ActivityType.like, assetId: 'test-asset')); @@ -114,6 +134,12 @@ void main() { final activities = await container.read(provider.future); expect(activities, hasLength(4)); expect(activities, isNot(contains(like))); + + verifyNever(() => albumActivityStatisticsMock.addActivity()); + + final albumActivities = container.read(albumProvider).requireValue; + expect(albumActivities, hasLength(4)); + expect(albumActivities, isNot(contains(like))); }); }); @@ -130,6 +156,7 @@ void main() { expect(activities, isNot(anyElement(predicate((Activity a) => a.id == '3')))); verifyNever(() => activityStatisticsMock.removeActivity()); + verifyNever(() => albumActivityStatisticsMock.removeActivity()); }); test('Remove Like failed', () async { @@ -140,6 +167,9 @@ void main() { final activities = await container.read(provider.future); expect(activities, hasLength(4)); expect(activities, anyElement(predicate((Activity a) => a.id == '3'))); + + verifyNever(() => activityStatisticsMock.removeActivity()); + verifyNever(() => albumActivityStatisticsMock.removeActivity()); }); test('Comment successfully removed', () async { @@ -151,23 +181,35 @@ void main() { expect(activities, isNot(anyElement(predicate((Activity a) => a.id == '1')))); verify(() => activityStatisticsMock.removeActivity()); + verify(() => albumActivityStatisticsMock.removeActivity()); + }); + + test('Removes activity from album state when asset scoped', () async { + when(() => activityMock.removeActivity('3')).thenAnswer((_) async => true); + when(() => activityMock.getAllActivities('test-album')).thenAnswer((_) async => [..._activities]); + + final albumProvider = albumActivityProvider('test-album'); + container.read(albumProvider.notifier); + await container.read(albumProvider.future); + + await container.read(provider.notifier).removeActivity('3'); + + final assetActivities = container.read(provider).requireValue; + final albumActivities = container.read(albumProvider).requireValue; + + expect(assetActivities, hasLength(3)); + expect(assetActivities, isNot(anyElement(predicate((Activity a) => a.id == '3')))); + + expect(albumActivities, hasLength(3)); + expect(albumActivities, isNot(anyElement(predicate((Activity a) => a.id == '3')))); + + verify(() => activityMock.removeActivity('3')); + verifyNever(() => activityStatisticsMock.removeActivity()); + verifyNever(() => albumActivityStatisticsMock.removeActivity()); }); }); group('addComment()', () { - late ActivityStatisticsMock albumActivityStatisticsMock; - - setUp(() { - albumActivityStatisticsMock = ActivityStatisticsMock(); - container = TestUtils.createContainer( - overrides: [ - activityServiceProvider.overrideWith((ref) => activityMock), - activityStatisticsProvider('test-album', 'test-asset').overrideWith(() => activityStatisticsMock), - activityStatisticsProvider('test-album').overrideWith(() => albumActivityStatisticsMock), - ], - ); - }); - test('Comment successfully added', () async { final comment = Activity( id: '5', @@ -178,6 +220,10 @@ void main() { assetId: 'test-asset', ); + final albumProvider = albumActivityProvider('test-album'); + container.read(albumProvider.notifier); + await container.read(albumProvider.future); + when( () => activityMock.addActivity( 'test-album', @@ -206,6 +252,10 @@ void main() { verify(() => activityStatisticsMock.addActivity()); verify(() => albumActivityStatisticsMock.addActivity()); + + final albumActivities = container.read(albumProvider).requireValue; + expect(albumActivities, hasLength(5)); + expect(albumActivities, contains(comment)); }); test('Comment successfully added without assetId', () async { @@ -225,6 +275,8 @@ void main() { when(() => activityMock.getAllActivities('test-album')).thenAnswer((_) async => [..._activities]); final albumProvider = albumActivityProvider('test-album'); + container.read(albumProvider.notifier); + await container.read(albumProvider.future); await container.read(albumProvider.notifier).addComment('Test-Comment'); verify( @@ -258,6 +310,10 @@ void main() { ), ).thenAnswer((_) async => AsyncError(Exception('Error'), StackTrace.current)); + final albumProvider = albumActivityProvider('test-album'); + container.read(albumProvider.notifier); + await container.read(albumProvider.future); + await container.read(provider.notifier).addComment('Test-Comment'); final activities = await container.read(provider.future); @@ -266,6 +322,10 @@ void main() { verifyNever(() => activityStatisticsMock.addActivity()); verifyNever(() => albumActivityStatisticsMock.addActivity()); + + final albumActivities = container.read(albumProvider).requireValue; + expect(albumActivities, hasLength(4)); + expect(albumActivities, isNot(contains(comment))); }); }); } diff --git a/mobile/test/services/hash_service_test.dart b/mobile/test/services/hash_service_test.dart index 74b8575e40..9429d434b0 100644 --- a/mobile/test/services/hash_service_test.dart +++ b/mobile/test/services/hash_service_test.dart @@ -12,16 +12,14 @@ import 'package:immich_mobile/infrastructure/repositories/device_asset.repositor import 'package:immich_mobile/services/background.service.dart'; import 'package:immich_mobile/services/hash.service.dart'; import 'package:mocktail/mocktail.dart'; -import 'package:photo_manager/photo_manager.dart'; import '../fixtures/asset.stub.dart'; import '../infrastructure/repository.mock.dart'; import '../service.mocks.dart'; +import '../mocks/asset_entity.mock.dart'; class MockAsset extends Mock implements Asset {} -class MockAssetEntity extends Mock implements AssetEntity {} - void main() { late HashService sut; late BackgroundService mockBackgroundService; diff --git a/mobile/test/services/upload.service_test.dart b/mobile/test/services/upload.service_test.dart index b18ad7b7d4..d33126782f 100644 --- a/mobile/test/services/upload.service_test.dart +++ b/mobile/test/services/upload.service_test.dart @@ -12,14 +12,12 @@ import 'package:immich_mobile/infrastructure/repositories/store.repository.dart' import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/services/upload.service.dart'; import 'package:mocktail/mocktail.dart'; -import 'package:photo_manager/photo_manager.dart'; import '../domain/service.mock.dart'; import '../fixtures/asset.stub.dart'; import '../infrastructure/repository.mock.dart'; import '../repository.mocks.dart'; - -class MockAssetEntity extends Mock implements AssetEntity {} +import '../mocks/asset_entity.mock.dart'; void main() { late UploadService sut; diff --git a/mobile/test/utils/semver_test.dart b/mobile/test/utils/semver_test.dart new file mode 100644 index 0000000000..8f1958a879 --- /dev/null +++ b/mobile/test/utils/semver_test.dart @@ -0,0 +1,92 @@ +import 'package:flutter_test/flutter_test.dart'; +import 'package:immich_mobile/utils/semver.dart'; + +void main() { + group('SemVer', () { + test('Parses valid semantic version strings correctly', () { + final version = SemVer.fromString('1.2.3'); + expect(version.major, 1); + expect(version.minor, 2); + expect(version.patch, 3); + }); + + test('Throws FormatException for invalid version strings', () { + expect(() => SemVer.fromString('1.2'), throwsFormatException); + expect(() => SemVer.fromString('a.b.c'), throwsFormatException); + expect(() => SemVer.fromString('1.2.3.4'), throwsFormatException); + }); + + test('Compares equal versons correctly', () { + final v1 = SemVer.fromString('1.2.3'); + final v2 = SemVer.fromString('1.2.3'); + expect(v1 == v2, isTrue); + expect(v1 > v2, isFalse); + expect(v1 < v2, isFalse); + }); + + test('Compares major version correctly', () { + final v1 = SemVer.fromString('2.0.0'); + final v2 = SemVer.fromString('1.9.9'); + expect(v1 == v2, isFalse); + expect(v1 > v2, isTrue); + expect(v1 < v2, isFalse); + }); + + test('Compares minor version correctly', () { + final v1 = SemVer.fromString('1.3.0'); + final v2 = SemVer.fromString('1.2.9'); + expect(v1 == v2, isFalse); + expect(v1 > v2, isTrue); + expect(v1 < v2, isFalse); + }); + + test('Compares patch version correctly', () { + final v1 = SemVer.fromString('1.2.4'); + final v2 = SemVer.fromString('1.2.3'); + expect(v1 == v2, isFalse); + expect(v1 > v2, isTrue); + expect(v1 < v2, isFalse); + }); + + test('Gives correct major difference type', () { + final v1 = SemVer.fromString('2.0.0'); + final v2 = SemVer.fromString('1.9.9'); + expect(v1.differenceType(v2), SemVerType.major); + }); + + test('Gives correct minor difference type', () { + final v1 = SemVer.fromString('1.3.0'); + final v2 = SemVer.fromString('1.2.9'); + expect(v1.differenceType(v2), SemVerType.minor); + }); + + test('Gives correct patch difference type', () { + final v1 = SemVer.fromString('1.2.4'); + final v2 = SemVer.fromString('1.2.3'); + expect(v1.differenceType(v2), SemVerType.patch); + }); + + test('Gives null difference type for equal versions', () { + final v1 = SemVer.fromString('1.2.3'); + final v2 = SemVer.fromString('1.2.3'); + expect(v1.differenceType(v2), isNull); + }); + + test('toString returns correct format', () { + final version = SemVer.fromString('1.2.3'); + expect(version.toString(), '1.2.3'); + }); + + test('Parses versions with leading v correctly', () { + final version1 = SemVer.fromString('v1.2.3'); + expect(version1.major, 1); + expect(version1.minor, 2); + expect(version1.patch, 3); + + final version2 = SemVer.fromString('V1.2.3'); + expect(version2.major, 1); + expect(version2.minor, 2); + expect(version2.patch, 3); + }); + }); +} diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index 0f2f1fa0cb..14ea79b66a 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -3,6 +3,7 @@ "paths": { "/activities": { "get": { + "description": "Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.", "operationId": "getActivities", "parameters": [ { @@ -75,13 +76,14 @@ "api_key": [] } ], + "summary": "List all activities", "tags": [ "Activities" ], - "x-immich-permission": "activity.read", - "description": "This endpoint requires the `activity.read` permission." + "x-immich-permission": "activity.read" }, "post": { + "description": "Create a like or a comment for an album, or an asset in an album.", "operationId": "createActivity", "parameters": [], "requestBody": { @@ -117,15 +119,16 @@ "api_key": [] } ], + "summary": "Create an activity", "tags": [ "Activities" ], - "x-immich-permission": "activity.create", - "description": "This endpoint requires the `activity.create` permission." + "x-immich-permission": "activity.create" } }, "/activities/statistics": { "get": { + "description": "Returns the number of likes and comments for a given album or asset in an album.", "operationId": "getActivityStatistics", "parameters": [ { @@ -170,15 +173,16 @@ "api_key": [] } ], + "summary": "Retrieve activity statistics", "tags": [ "Activities" ], - "x-immich-permission": "activity.statistics", - "description": "This endpoint requires the `activity.statistics` permission." + "x-immich-permission": "activity.statistics" } }, "/activities/{id}": { "delete": { + "description": "Removes a like or comment from a given album or asset in an album.", "operationId": "deleteActivity", "parameters": [ { @@ -207,15 +211,16 @@ "api_key": [] } ], + "summary": "Delete an activity", "tags": [ "Activities" ], - "x-immich-permission": "activity.delete", - "description": "This endpoint requires the `activity.delete` permission." + "x-immich-permission": "activity.delete" } }, "/admin/auth/unlink-all": { "post": { + "description": "Unlinks all OAuth accounts associated with user accounts in the system.", "operationId": "unlinkAllOAuthAccountsAdmin", "parameters": [], "responses": { @@ -234,12 +239,12 @@ "api_key": [] } ], + "summary": "Unlink all OAuth accounts", "tags": [ - "Auth (admin)" + "Authentication (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminAuth.unlinkAll", - "description": "This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission." + "x-immich-permission": "adminAuth.unlinkAll" } }, "/admin/maintenance/end": { @@ -266,8 +271,7 @@ "Maintenance (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "maintenance", - "description": "This endpoint is an admin-only route, and requires the `maintenance` permission." + "x-immich-permission": "maintenance" } }, "/admin/maintenance/login": { @@ -325,12 +329,12 @@ "Maintenance (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "maintenance", - "description": "This endpoint is an admin-only route, and requires the `maintenance` permission." + "x-immich-permission": "maintenance" } }, "/admin/notifications": { "post": { + "description": "Create a new notification for a specific user.", "operationId": "createNotification", "parameters": [], "requestBody": { @@ -366,14 +370,16 @@ "api_key": [] } ], + "summary": "Create a notification", "tags": [ - "Notifications (Admin)" + "Notifications (admin)" ], "x-immich-admin-only": true } }, "/admin/notifications/templates/{name}": { "post": { + "description": "Retrieve a preview of the provided email template.", "operationId": "getNotificationTemplateAdmin", "parameters": [ { @@ -418,14 +424,16 @@ "api_key": [] } ], + "summary": "Render email template", "tags": [ - "Notifications (Admin)" + "Notifications (admin)" ], "x-immich-admin-only": true } }, "/admin/notifications/test-email": { "post": { + "description": "Send a test email using the provided SMTP configuration.", "operationId": "sendTestEmailAdmin", "parameters": [], "requestBody": { @@ -461,14 +469,16 @@ "api_key": [] } ], + "summary": "Send test email", "tags": [ - "Notifications (Admin)" + "Notifications (admin)" ], "x-immich-admin-only": true } }, "/admin/users": { "get": { + "description": "Search for users.", "operationId": "searchUsersAdmin", "parameters": [ { @@ -515,14 +525,15 @@ "api_key": [] } ], + "summary": "Search users", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" }, "post": { + "description": "Create a new user.", "operationId": "createUserAdmin", "parameters": [], "requestBody": { @@ -558,16 +569,17 @@ "api_key": [] } ], + "summary": "Create a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.create", - "description": "This endpoint is an admin-only route, and requires the `adminUser.create` permission." + "x-immich-permission": "adminUser.create" } }, "/admin/users/{id}": { "delete": { + "description": "Delete a user.", "operationId": "deleteUserAdmin", "parameters": [ { @@ -613,14 +625,15 @@ "api_key": [] } ], + "summary": "Delete a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.delete", - "description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission." + "x-immich-permission": "adminUser.delete" }, "get": { + "description": "Retrieve a specific user by their ID.", "operationId": "getUserAdmin", "parameters": [ { @@ -656,14 +669,15 @@ "api_key": [] } ], + "summary": "Retrieve a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" }, "put": { + "description": "Update an existing user.", "operationId": "updateUserAdmin", "parameters": [ { @@ -709,16 +723,17 @@ "api_key": [] } ], + "summary": "Update a user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.update", - "description": "This endpoint is an admin-only route, and requires the `adminUser.update` permission." + "x-immich-permission": "adminUser.update" } }, "/admin/users/{id}/preferences": { "get": { + "description": "Retrieve the preferences of a specific user.", "operationId": "getUserPreferencesAdmin", "parameters": [ { @@ -754,14 +769,15 @@ "api_key": [] } ], + "summary": "Retrieve user preferences", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" }, "put": { + "description": "Update the preferences of a specific user.", "operationId": "updateUserPreferencesAdmin", "parameters": [ { @@ -807,16 +823,17 @@ "api_key": [] } ], + "summary": "Update user preferences", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.update", - "description": "This endpoint is an admin-only route, and requires the `adminUser.update` permission." + "x-immich-permission": "adminUser.update" } }, "/admin/users/{id}/restore": { "post": { + "description": "Restore a previously deleted user.", "operationId": "restoreUserAdmin", "parameters": [ { @@ -852,16 +869,17 @@ "api_key": [] } ], + "summary": "Restore a deleted user", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.delete", - "description": "This endpoint is an admin-only route, and requires the `adminUser.delete` permission." + "x-immich-permission": "adminUser.delete" } }, "/admin/users/{id}/sessions": { "get": { + "description": "Retrieve all sessions for a specific user.", "operationId": "getUserSessionsAdmin", "parameters": [ { @@ -900,16 +918,17 @@ "api_key": [] } ], + "summary": "Retrieve user sessions", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminSession.read", - "description": "This endpoint is an admin-only route, and requires the `adminSession.read` permission." + "x-immich-permission": "adminSession.read" } }, "/admin/users/{id}/statistics": { "get": { + "description": "Retrieve asset statistics for a specific user.", "operationId": "getUserStatisticsAdmin", "parameters": [ { @@ -969,16 +988,17 @@ "api_key": [] } ], + "summary": "Retrieve user statistics", "tags": [ "Users (admin)" ], "x-immich-admin-only": true, - "x-immich-permission": "adminUser.read", - "description": "This endpoint is an admin-only route, and requires the `adminUser.read` permission." + "x-immich-permission": "adminUser.read" } }, "/albums": { "get": { + "description": "Retrieve a list of albums available to the authenticated user.", "operationId": "getAllAlbums", "parameters": [ { @@ -1026,13 +1046,14 @@ "api_key": [] } ], + "summary": "List all albums", "tags": [ "Albums" ], - "x-immich-permission": "album.read", - "description": "This endpoint requires the `album.read` permission." + "x-immich-permission": "album.read" }, "post": { + "description": "Create a new album. The album can also be created with initial users and assets.", "operationId": "createAlbum", "parameters": [], "requestBody": { @@ -1068,15 +1089,16 @@ "api_key": [] } ], + "summary": "Create an album", "tags": [ "Albums" ], - "x-immich-permission": "album.create", - "description": "This endpoint requires the `album.create` permission." + "x-immich-permission": "album.create" } }, "/albums/assets": { "put": { + "description": "Send a list of asset IDs and album IDs to add each asset to each album.", "operationId": "addAssetsToAlbums", "parameters": [ { @@ -1129,15 +1151,16 @@ "api_key": [] } ], + "summary": "Add assets to albums", "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.create", - "description": "This endpoint requires the `albumAsset.create` permission." + "x-immich-permission": "albumAsset.create" } }, "/albums/statistics": { "get": { + "description": "Returns statistics about the albums available to the authenticated user.", "operationId": "getAlbumStatistics", "parameters": [], "responses": { @@ -1163,15 +1186,16 @@ "api_key": [] } ], + "summary": "Retrieve album statistics", "tags": [ "Albums" ], - "x-immich-permission": "album.statistics", - "description": "This endpoint requires the `album.statistics` permission." + "x-immich-permission": "album.statistics" } }, "/albums/{id}": { "delete": { + "description": "Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.", "operationId": "deleteAlbum", "parameters": [ { @@ -1200,13 +1224,14 @@ "api_key": [] } ], + "summary": "Delete an album", "tags": [ "Albums" ], - "x-immich-permission": "album.delete", - "description": "This endpoint requires the `album.delete` permission." + "x-immich-permission": "album.delete" }, "get": { + "description": "Retrieve information about a specific album by its ID.", "operationId": "getAlbumInfo", "parameters": [ { @@ -1266,13 +1291,14 @@ "api_key": [] } ], + "summary": "Retrieve an album", "tags": [ "Albums" ], - "x-immich-permission": "album.read", - "description": "This endpoint requires the `album.read` permission." + "x-immich-permission": "album.read" }, "patch": { + "description": "Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.", "operationId": "updateAlbumInfo", "parameters": [ { @@ -1318,15 +1344,16 @@ "api_key": [] } ], + "summary": "Update an album", "tags": [ "Albums" ], - "x-immich-permission": "album.update", - "description": "This endpoint requires the `album.update` permission." + "x-immich-permission": "album.update" } }, "/albums/{id}/assets": { "delete": { + "description": "Remove multiple assets from a specific album by its ID.", "operationId": "removeAssetFromAlbum", "parameters": [ { @@ -1375,13 +1402,14 @@ "api_key": [] } ], + "summary": "Remove assets from an album", "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.delete", - "description": "This endpoint requires the `albumAsset.delete` permission." + "x-immich-permission": "albumAsset.delete" }, "put": { + "description": "Add multiple assets to a specific album by its ID.", "operationId": "addAssetsToAlbum", "parameters": [ { @@ -1446,15 +1474,16 @@ "api_key": [] } ], + "summary": "Add assets to an album", "tags": [ "Albums" ], - "x-immich-permission": "albumAsset.create", - "description": "This endpoint requires the `albumAsset.create` permission." + "x-immich-permission": "albumAsset.create" } }, "/albums/{id}/user/{userId}": { "delete": { + "description": "Remove a user from an album. Use an ID of \"me\" to leave a shared album.", "operationId": "removeUserFromAlbum", "parameters": [ { @@ -1491,13 +1520,14 @@ "api_key": [] } ], + "summary": "Remove user from album", "tags": [ "Albums" ], - "x-immich-permission": "albumUser.delete", - "description": "This endpoint requires the `albumUser.delete` permission." + "x-immich-permission": "albumUser.delete" }, "put": { + "description": "Change the role for a specific user in a specific album.", "operationId": "updateAlbumUser", "parameters": [ { @@ -1544,15 +1574,16 @@ "api_key": [] } ], + "summary": "Update user role", "tags": [ "Albums" ], - "x-immich-permission": "albumUser.update", - "description": "This endpoint requires the `albumUser.update` permission." + "x-immich-permission": "albumUser.update" } }, "/albums/{id}/users": { "put": { + "description": "Share an album with multiple users. Each user can be given a specific role in the album.", "operationId": "addUsersToAlbum", "parameters": [ { @@ -1598,15 +1629,16 @@ "api_key": [] } ], + "summary": "Share album with users", "tags": [ "Albums" ], - "x-immich-permission": "albumUser.create", - "description": "This endpoint requires the `albumUser.create` permission." + "x-immich-permission": "albumUser.create" } }, "/api-keys": { "get": { + "description": "Retrieve all API keys of the current user.", "operationId": "getApiKeys", "parameters": [], "responses": { @@ -1635,13 +1667,14 @@ "api_key": [] } ], + "summary": "List all API keys", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.read", - "description": "This endpoint requires the `apiKey.read` permission." + "x-immich-permission": "apiKey.read" }, "post": { + "description": "Creates a new API key. It will be limited to the permissions specified.", "operationId": "createApiKey", "parameters": [], "requestBody": { @@ -1677,15 +1710,16 @@ "api_key": [] } ], + "summary": "Create an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.create", - "description": "This endpoint requires the `apiKey.create` permission." + "x-immich-permission": "apiKey.create" } }, "/api-keys/me": { "get": { + "description": "Retrieve the API key that is used to access this endpoint.", "operationId": "getMyApiKey", "parameters": [], "responses": { @@ -1711,13 +1745,15 @@ "api_key": [] } ], + "summary": "Retrieve the current API key", "tags": [ - "API Keys" + "API keys" ] } }, "/api-keys/{id}": { "delete": { + "description": "Deletes an API key identified by its ID. The current user must own this API key.", "operationId": "deleteApiKey", "parameters": [ { @@ -1746,13 +1782,14 @@ "api_key": [] } ], + "summary": "Delete an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.delete", - "description": "This endpoint requires the `apiKey.delete` permission." + "x-immich-permission": "apiKey.delete" }, "get": { + "description": "Retrieve an API key by its ID. The current user must own this API key.", "operationId": "getApiKey", "parameters": [ { @@ -1788,13 +1825,14 @@ "api_key": [] } ], + "summary": "Retrieve an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.read", - "description": "This endpoint requires the `apiKey.read` permission." + "x-immich-permission": "apiKey.read" }, "put": { + "description": "Updates the name and permissions of an API key by its ID. The current user must own this API key.", "operationId": "updateApiKey", "parameters": [ { @@ -1840,15 +1878,16 @@ "api_key": [] } ], + "summary": "Update an API key", "tags": [ - "API Keys" + "API keys" ], - "x-immich-permission": "apiKey.update", - "description": "This endpoint requires the `apiKey.update` permission." + "x-immich-permission": "apiKey.update" } }, "/assets": { "delete": { + "description": "Deletes multiple assets at the same time.", "operationId": "deleteAssets", "parameters": [], "requestBody": { @@ -1877,13 +1916,14 @@ "api_key": [] } ], + "summary": "Delete assets", "tags": [ "Assets" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" }, "post": { + "description": "Uploads a new asset to the server.", "operationId": "uploadAsset", "parameters": [ { @@ -1946,13 +1986,14 @@ "api_key": [] } ], + "summary": "Upload asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.upload", - "description": "This endpoint requires the `asset.upload` permission." + "x-immich-permission": "asset.upload" }, "put": { + "description": "Updates multiple assets at the same time.", "operationId": "updateAssets", "parameters": [], "requestBody": { @@ -1981,16 +2022,16 @@ "api_key": [] } ], + "summary": "Update assets", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" } }, "/assets/bulk-upload-check": { "post": { - "description": "Checks if assets exist by checksums. This endpoint requires the `asset.upload` permission.", + "description": "Determine which assets have already been uploaded to the server based on their SHA1 checksums.", "operationId": "checkBulkUpload", "parameters": [], "requestBody": { @@ -2026,7 +2067,7 @@ "api_key": [] } ], - "summary": "checkBulkUpload", + "summary": "Check bulk upload", "tags": [ "Assets" ], @@ -2035,6 +2076,7 @@ }, "/assets/copy": { "put": { + "description": "Copy asset information like albums, tags, etc. from one asset to another.", "operationId": "copyAsset", "parameters": [], "requestBody": { @@ -2063,16 +2105,17 @@ "api_key": [] } ], + "summary": "Copy asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.copy", - "description": "This endpoint requires the `asset.copy` permission." + "x-immich-permission": "asset.copy" } }, "/assets/device/{deviceId}": { "get": { - "description": "Get all asset of a device that are in the database, ID only.", + "deprecated": true, + "description": "This property was deprecated in v2.0.0. Get all asset of a device that are in the database, ID only.", "operationId": "getAllUserAssetsByDeviceId", "parameters": [ { @@ -2110,10 +2153,14 @@ "api_key": [] } ], - "summary": "getAllUserAssetsByDeviceId", + "summary": "Retrieve assets by device ID", "tags": [ - "Assets" - ] + "Assets", + "Deprecated" + ], + "x-immich-lifecycle": { + "deprecatedAt": "v2.0.0" + } } }, "/assets/exist": { @@ -2154,7 +2201,7 @@ "api_key": [] } ], - "summary": "checkExistingAssets", + "summary": "Check existing assets", "tags": [ "Assets" ] @@ -2162,6 +2209,7 @@ }, "/assets/jobs": { "post": { + "description": "Run a specific job on a set of assets.", "operationId": "runAssetJobs", "parameters": [], "requestBody": { @@ -2190,6 +2238,7 @@ "api_key": [] } ], + "summary": "Run an asset job", "tags": [ "Assets" ] @@ -2198,7 +2247,7 @@ "/assets/random": { "get": { "deprecated": true, - "description": "This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission.", + "description": "This property was deprecated in v1.116.0. Retrieve a specified number of random assets for the authenticated user.", "operationId": "getRandom", "parameters": [ { @@ -2237,6 +2286,7 @@ "api_key": [] } ], + "summary": "Get random assets", "tags": [ "Assets", "Deprecated" @@ -2249,6 +2299,7 @@ }, "/assets/statistics": { "get": { + "description": "Retrieve various statistics about the assets owned by the authenticated user.", "operationId": "getAssetStatistics", "parameters": [ { @@ -2299,15 +2350,16 @@ "api_key": [] } ], + "summary": "Get asset statistics", "tags": [ "Assets" ], - "x-immich-permission": "asset.statistics", - "description": "This endpoint requires the `asset.statistics` permission." + "x-immich-permission": "asset.statistics" } }, "/assets/{id}": { "get": { + "description": "Retrieve detailed information about a specific asset.", "operationId": "getAssetInfo", "parameters": [ { @@ -2359,13 +2411,14 @@ "api_key": [] } ], + "summary": "Retrieve an asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" }, "put": { + "description": "Update information of a specific asset.", "operationId": "updateAsset", "parameters": [ { @@ -2411,15 +2464,16 @@ "api_key": [] } ], + "summary": "Update an asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" } }, "/assets/{id}/metadata": { "get": { + "description": "Retrieve all metadata key-value pairs associated with the specified asset.", "operationId": "getAssetMetadata", "parameters": [ { @@ -2458,13 +2512,14 @@ "api_key": [] } ], + "summary": "Get asset metadata", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" }, "put": { + "description": "Update or add metadata key-value pairs for the specified asset.", "operationId": "updateAssetMetadata", "parameters": [ { @@ -2513,15 +2568,16 @@ "api_key": [] } ], + "summary": "Update asset metadata", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" } }, "/assets/{id}/metadata/{key}": { "delete": { + "description": "Delete a specific metadata key-value pair associated with the specified asset.", "operationId": "deleteAssetMetadata", "parameters": [ { @@ -2558,13 +2614,14 @@ "api_key": [] } ], + "summary": "Delete asset metadata by key", "tags": [ "Assets" ], - "x-immich-permission": "asset.update", - "description": "This endpoint requires the `asset.update` permission." + "x-immich-permission": "asset.update" }, "get": { + "description": "Retrieve the value of a specific metadata key associated with the specified asset.", "operationId": "getAssetMetadataByKey", "parameters": [ { @@ -2608,15 +2665,16 @@ "api_key": [] } ], + "summary": "Retrieve asset metadata by key", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/assets/{id}/ocr": { "get": { + "description": "Retrieve all OCR (Optical Character Recognition) data associated with the specified asset.", "operationId": "getAssetOcr", "parameters": [ { @@ -2655,15 +2713,16 @@ "api_key": [] } ], + "summary": "Retrieve asset OCR data", "tags": [ "Assets" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/assets/{id}/original": { "get": { + "description": "Downloads the original file of the specified asset.", "operationId": "downloadAsset", "parameters": [ { @@ -2716,15 +2775,15 @@ "api_key": [] } ], + "summary": "Download original asset", "tags": [ "Assets" ], - "x-immich-permission": "asset.download", - "description": "This endpoint requires the `asset.download` permission." + "x-immich-permission": "asset.download" }, "put": { "deprecated": true, - "description": "This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id. This endpoint requires the `asset.replace` permission.", + "description": "This property was deprecated in v1.142.0. Replace the asset with new file, without changing its id.", "operationId": "replaceAsset", "parameters": [ { @@ -2786,7 +2845,7 @@ "api_key": [] } ], - "summary": "Replace the asset with new file, without changing its id", + "summary": "Replace asset", "tags": [ "Assets", "Deprecated" @@ -2800,6 +2859,7 @@ }, "/assets/{id}/thumbnail": { "get": { + "description": "Retrieve the thumbnail image for the specified asset.", "operationId": "viewAsset", "parameters": [ { @@ -2860,15 +2920,16 @@ "api_key": [] } ], + "summary": "View asset thumbnail", "tags": [ "Assets" ], - "x-immich-permission": "asset.view", - "description": "This endpoint requires the `asset.view` permission." + "x-immich-permission": "asset.view" } }, "/assets/{id}/video/playback": { "get": { + "description": "Streams the video file for the specified asset. This endpoint also supports byte range requests.", "operationId": "playAssetVideo", "parameters": [ { @@ -2921,15 +2982,16 @@ "api_key": [] } ], + "summary": "Play asset video", "tags": [ "Assets" ], - "x-immich-permission": "asset.view", - "description": "This endpoint requires the `asset.view` permission." + "x-immich-permission": "asset.view" } }, "/auth/admin-sign-up": { "post": { + "description": "Create the first admin user in the system.", "operationId": "signUpAdmin", "parameters": [], "requestBody": { @@ -2954,6 +3016,7 @@ "description": "" } }, + "summary": "Register admin", "tags": [ "Authentication" ] @@ -2961,6 +3024,7 @@ }, "/auth/change-password": { "post": { + "description": "Change the password of the current user.", "operationId": "changePassword", "parameters": [], "requestBody": { @@ -2996,15 +3060,16 @@ "api_key": [] } ], + "summary": "Change password", "tags": [ "Authentication" ], - "x-immich-permission": "auth.changePassword", - "description": "This endpoint requires the `auth.changePassword` permission." + "x-immich-permission": "auth.changePassword" } }, "/auth/login": { "post": { + "description": "Login with username and password and receive a session token.", "operationId": "login", "parameters": [], "requestBody": { @@ -3029,6 +3094,7 @@ "description": "" } }, + "summary": "Login", "tags": [ "Authentication" ] @@ -3036,6 +3102,7 @@ }, "/auth/logout": { "post": { + "description": "Logout the current user and invalidate the session token.", "operationId": "logout", "parameters": [], "responses": { @@ -3061,6 +3128,7 @@ "api_key": [] } ], + "summary": "Logout", "tags": [ "Authentication" ] @@ -3068,6 +3136,7 @@ }, "/auth/pin-code": { "delete": { + "description": "Reset the pin code for the current user by providing the account password", "operationId": "resetPinCode", "parameters": [], "requestBody": { @@ -3096,13 +3165,14 @@ "api_key": [] } ], + "summary": "Reset pin code", "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.delete", - "description": "This endpoint requires the `pinCode.delete` permission." + "x-immich-permission": "pinCode.delete" }, "post": { + "description": "Setup a new pin code for the current user.", "operationId": "setupPinCode", "parameters": [], "requestBody": { @@ -3131,13 +3201,14 @@ "api_key": [] } ], + "summary": "Setup pin code", "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.create", - "description": "This endpoint requires the `pinCode.create` permission." + "x-immich-permission": "pinCode.create" }, "put": { + "description": "Change the pin code for the current user.", "operationId": "changePinCode", "parameters": [], "requestBody": { @@ -3166,15 +3237,16 @@ "api_key": [] } ], + "summary": "Change pin code", "tags": [ "Authentication" ], - "x-immich-permission": "pinCode.update", - "description": "This endpoint requires the `pinCode.update` permission." + "x-immich-permission": "pinCode.update" } }, "/auth/session/lock": { "post": { + "description": "Remove elevated access to locked assets from the current session.", "operationId": "lockAuthSession", "parameters": [], "responses": { @@ -3193,6 +3265,7 @@ "api_key": [] } ], + "summary": "Lock auth session", "tags": [ "Authentication" ] @@ -3200,6 +3273,7 @@ }, "/auth/session/unlock": { "post": { + "description": "Temporarily grant the session elevated access to locked assets by providing the correct PIN code.", "operationId": "unlockAuthSession", "parameters": [], "requestBody": { @@ -3228,6 +3302,7 @@ "api_key": [] } ], + "summary": "Unlock auth session", "tags": [ "Authentication" ] @@ -3235,6 +3310,7 @@ }, "/auth/status": { "get": { + "description": "Get information about the current session, including whether the user has a password, and if the session can access locked assets.", "operationId": "getAuthStatus", "parameters": [], "responses": { @@ -3260,6 +3336,7 @@ "api_key": [] } ], + "summary": "Retrieve auth status", "tags": [ "Authentication" ] @@ -3267,6 +3344,7 @@ }, "/auth/validateToken": { "post": { + "description": "Validate the current authorization method is still valid.", "operationId": "validateAccessToken", "parameters": [], "responses": { @@ -3292,6 +3370,7 @@ "api_key": [] } ], + "summary": "Validate access token", "tags": [ "Authentication" ] @@ -3299,6 +3378,7 @@ }, "/download/archive": { "post": { + "description": "Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.", "operationId": "downloadArchive", "parameters": [ { @@ -3352,15 +3432,16 @@ "api_key": [] } ], + "summary": "Download asset archive", "tags": [ "Download" ], - "x-immich-permission": "asset.download", - "description": "This endpoint requires the `asset.download` permission." + "x-immich-permission": "asset.download" } }, "/download/info": { "post": { + "description": "Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.", "operationId": "getDownloadInfo", "parameters": [ { @@ -3413,15 +3494,16 @@ "api_key": [] } ], + "summary": "Retrieve download information", "tags": [ "Download" ], - "x-immich-permission": "asset.download", - "description": "This endpoint requires the `asset.download` permission." + "x-immich-permission": "asset.download" } }, "/duplicates": { "delete": { + "description": "Delete multiple duplicate assets specified by their IDs.", "operationId": "deleteDuplicates", "parameters": [], "requestBody": { @@ -3450,13 +3532,14 @@ "api_key": [] } ], + "summary": "Delete duplicates", "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.delete", - "description": "This endpoint requires the `duplicate.delete` permission." + "x-immich-permission": "duplicate.delete" }, "get": { + "description": "Retrieve a list of duplicate assets available to the authenticated user.", "operationId": "getAssetDuplicates", "parameters": [], "responses": { @@ -3485,15 +3568,16 @@ "api_key": [] } ], + "summary": "Retrieve duplicates", "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.read", - "description": "This endpoint requires the `duplicate.read` permission." + "x-immich-permission": "duplicate.read" } }, "/duplicates/{id}": { "delete": { + "description": "Delete a single duplicate asset specified by its ID.", "operationId": "deleteDuplicate", "parameters": [ { @@ -3522,15 +3606,16 @@ "api_key": [] } ], + "summary": "Delete a duplicate", "tags": [ "Duplicates" ], - "x-immich-permission": "duplicate.delete", - "description": "This endpoint requires the `duplicate.delete` permission." + "x-immich-permission": "duplicate.delete" } }, "/faces": { "get": { + "description": "Retrieve all faces belonging to an asset.", "operationId": "getFaces", "parameters": [ { @@ -3569,13 +3654,14 @@ "api_key": [] } ], + "summary": "Retrieve faces for asset", "tags": [ "Faces" ], - "x-immich-permission": "face.read", - "description": "This endpoint requires the `face.read` permission." + "x-immich-permission": "face.read" }, "post": { + "description": "Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.", "operationId": "createFace", "parameters": [], "requestBody": { @@ -3604,15 +3690,16 @@ "api_key": [] } ], + "summary": "Create a face", "tags": [ "Faces" ], - "x-immich-permission": "face.create", - "description": "This endpoint requires the `face.create` permission." + "x-immich-permission": "face.create" } }, "/faces/{id}": { "delete": { + "description": "Delete a face identified by the id. Optionally can be force deleted.", "operationId": "deleteFace", "parameters": [ { @@ -3651,13 +3738,14 @@ "api_key": [] } ], + "summary": "Delete a face", "tags": [ "Faces" ], - "x-immich-permission": "face.delete", - "description": "This endpoint requires the `face.delete` permission." + "x-immich-permission": "face.delete" }, "put": { + "description": "Re-assign the face provided in the body to the person identified by the id in the path parameter.", "operationId": "reassignFacesById", "parameters": [ { @@ -3703,15 +3791,16 @@ "api_key": [] } ], + "summary": "Re-assign a face to another person", "tags": [ "Faces" ], - "x-immich-permission": "face.update", - "description": "This endpoint requires the `face.update` permission." + "x-immich-permission": "face.update" } }, "/jobs": { "get": { + "description": "Retrieve the counts of the current queue, as well as the current status.", "operationId": "getAllJobsStatus", "parameters": [], "responses": { @@ -3737,14 +3826,15 @@ "api_key": [] } ], + "summary": "Retrieve queue counts and status", "tags": [ "Jobs" ], "x-immich-admin-only": true, - "x-immich-permission": "job.read", - "description": "This endpoint is an admin-only route, and requires the `job.read` permission." + "x-immich-permission": "job.read" }, "post": { + "description": "Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.", "operationId": "createJob", "parameters": [], "requestBody": { @@ -3773,16 +3863,17 @@ "api_key": [] } ], + "summary": "Create a manual job", "tags": [ "Jobs" ], "x-immich-admin-only": true, - "x-immich-permission": "job.create", - "description": "This endpoint is an admin-only route, and requires the `job.create` permission." + "x-immich-permission": "job.create" } }, "/jobs/{id}": { "put": { + "description": "Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.", "operationId": "sendJobCommand", "parameters": [ { @@ -3827,16 +3918,17 @@ "api_key": [] } ], + "summary": "Run jobs", "tags": [ "Jobs" ], "x-immich-admin-only": true, - "x-immich-permission": "job.create", - "description": "This endpoint is an admin-only route, and requires the `job.create` permission." + "x-immich-permission": "job.create" } }, "/libraries": { "get": { + "description": "Retrieve a list of external libraries.", "operationId": "getAllLibraries", "parameters": [], "responses": { @@ -3865,14 +3957,15 @@ "api_key": [] } ], + "summary": "Retrieve libraries", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.read", - "description": "This endpoint is an admin-only route, and requires the `library.read` permission." + "x-immich-permission": "library.read" }, "post": { + "description": "Create a new external library.", "operationId": "createLibrary", "parameters": [], "requestBody": { @@ -3908,16 +4001,17 @@ "api_key": [] } ], + "summary": "Create a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.create", - "description": "This endpoint is an admin-only route, and requires the `library.create` permission." + "x-immich-permission": "library.create" } }, "/libraries/{id}": { "delete": { + "description": "Delete an external library by its ID.", "operationId": "deleteLibrary", "parameters": [ { @@ -3946,14 +4040,15 @@ "api_key": [] } ], + "summary": "Delete a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.delete", - "description": "This endpoint is an admin-only route, and requires the `library.delete` permission." + "x-immich-permission": "library.delete" }, "get": { + "description": "Retrieve an external library by its ID.", "operationId": "getLibrary", "parameters": [ { @@ -3989,14 +4084,15 @@ "api_key": [] } ], + "summary": "Retrieve a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.read", - "description": "This endpoint is an admin-only route, and requires the `library.read` permission." + "x-immich-permission": "library.read" }, "put": { + "description": "Update an existing external library.", "operationId": "updateLibrary", "parameters": [ { @@ -4042,16 +4138,17 @@ "api_key": [] } ], + "summary": "Update a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.update", - "description": "This endpoint is an admin-only route, and requires the `library.update` permission." + "x-immich-permission": "library.update" } }, "/libraries/{id}/scan": { "post": { + "description": "Queue a scan for the external library to find and import new assets.", "operationId": "scanLibrary", "parameters": [ { @@ -4080,16 +4177,17 @@ "api_key": [] } ], + "summary": "Scan a library", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.update", - "description": "This endpoint is an admin-only route, and requires the `library.update` permission." + "x-immich-permission": "library.update" } }, "/libraries/{id}/statistics": { "get": { + "description": "Retrieve statistics for a specific external library, including number of videos, images, and storage usage.", "operationId": "getLibraryStatistics", "parameters": [ { @@ -4125,16 +4223,17 @@ "api_key": [] } ], + "summary": "Retrieve library statistics", "tags": [ "Libraries" ], "x-immich-admin-only": true, - "x-immich-permission": "library.statistics", - "description": "This endpoint is an admin-only route, and requires the `library.statistics` permission." + "x-immich-permission": "library.statistics" } }, "/libraries/{id}/validate": { "post": { + "description": "Validate the settings of an external library.", "operationId": "validate", "parameters": [ { @@ -4180,6 +4279,7 @@ "api_key": [] } ], + "summary": "Validate library settings", "tags": [ "Libraries" ], @@ -4188,24 +4288,9 @@ }, "/map/markers": { "get": { + "description": "Retrieve a list of latitude and longitude coordinates for every asset with location data.", "operationId": "getMapMarkers", "parameters": [ - { - "name": "isArchived", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "isFavorite", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, { "name": "fileCreatedAfter", "required": false, @@ -4224,6 +4309,22 @@ "type": "string" } }, + { + "name": "isArchived", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "isFavorite", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, { "name": "withPartners", "required": false, @@ -4267,6 +4368,7 @@ "api_key": [] } ], + "summary": "Retrieve map markers", "tags": [ "Map" ] @@ -4274,6 +4376,7 @@ }, "/map/reverse-geocode": { "get": { + "description": "Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.", "operationId": "reverseGeocode", "parameters": [ { @@ -4321,6 +4424,7 @@ "api_key": [] } ], + "summary": "Reverse geocode coordinates", "tags": [ "Map" ] @@ -4328,6 +4432,7 @@ }, "/memories": { "get": { + "description": "Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.", "operationId": "searchMemories", "parameters": [ { @@ -4355,6 +4460,24 @@ "type": "boolean" } }, + { + "name": "order", + "required": false, + "in": "query", + "schema": { + "$ref": "#/components/schemas/MemorySearchOrder" + } + }, + { + "name": "size", + "required": false, + "in": "query", + "description": "Number of memories to return", + "schema": { + "minimum": 1, + "type": "integer" + } + }, { "name": "type", "required": false, @@ -4390,13 +4513,14 @@ "api_key": [] } ], + "summary": "Retrieve memories", "tags": [ "Memories" ], - "x-immich-permission": "memory.read", - "description": "This endpoint requires the `memory.read` permission." + "x-immich-permission": "memory.read" }, "post": { + "description": "Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.", "operationId": "createMemory", "parameters": [], "requestBody": { @@ -4432,15 +4556,16 @@ "api_key": [] } ], + "summary": "Create a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.create", - "description": "This endpoint requires the `memory.create` permission." + "x-immich-permission": "memory.create" } }, "/memories/statistics": { "get": { + "description": "Retrieve statistics about memories, such as total count and other relevant metrics.", "operationId": "memoriesStatistics", "parameters": [ { @@ -4468,6 +4593,24 @@ "type": "boolean" } }, + { + "name": "order", + "required": false, + "in": "query", + "schema": { + "$ref": "#/components/schemas/MemorySearchOrder" + } + }, + { + "name": "size", + "required": false, + "in": "query", + "description": "Number of memories to return", + "schema": { + "minimum": 1, + "type": "integer" + } + }, { "name": "type", "required": false, @@ -4500,15 +4643,16 @@ "api_key": [] } ], + "summary": "Retrieve memories statistics", "tags": [ "Memories" ], - "x-immich-permission": "memory.statistics", - "description": "This endpoint requires the `memory.statistics` permission." + "x-immich-permission": "memory.statistics" } }, "/memories/{id}": { "delete": { + "description": "Delete a specific memory by its ID.", "operationId": "deleteMemory", "parameters": [ { @@ -4537,13 +4681,14 @@ "api_key": [] } ], + "summary": "Delete a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.delete", - "description": "This endpoint requires the `memory.delete` permission." + "x-immich-permission": "memory.delete" }, "get": { + "description": "Retrieve a specific memory by its ID.", "operationId": "getMemory", "parameters": [ { @@ -4579,13 +4724,14 @@ "api_key": [] } ], + "summary": "Retrieve a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.read", - "description": "This endpoint requires the `memory.read` permission." + "x-immich-permission": "memory.read" }, "put": { + "description": "Update an existing memory by its ID.", "operationId": "updateMemory", "parameters": [ { @@ -4631,15 +4777,16 @@ "api_key": [] } ], + "summary": "Update a memory", "tags": [ "Memories" ], - "x-immich-permission": "memory.update", - "description": "This endpoint requires the `memory.update` permission." + "x-immich-permission": "memory.update" } }, "/memories/{id}/assets": { "delete": { + "description": "Remove a list of asset IDs from a specific memory.", "operationId": "removeMemoryAssets", "parameters": [ { @@ -4688,13 +4835,14 @@ "api_key": [] } ], + "summary": "Remove assets from a memory", "tags": [ "Memories" ], - "x-immich-permission": "memoryAsset.delete", - "description": "This endpoint requires the `memoryAsset.delete` permission." + "x-immich-permission": "memoryAsset.delete" }, "put": { + "description": "Add a list of asset IDs to a specific memory.", "operationId": "addMemoryAssets", "parameters": [ { @@ -4743,15 +4891,16 @@ "api_key": [] } ], + "summary": "Add assets to a memory", "tags": [ "Memories" ], - "x-immich-permission": "memoryAsset.create", - "description": "This endpoint requires the `memoryAsset.create` permission." + "x-immich-permission": "memoryAsset.create" } }, "/notifications": { "delete": { + "description": "Delete a list of notifications at once.", "operationId": "deleteNotifications", "parameters": [], "requestBody": { @@ -4780,13 +4929,14 @@ "api_key": [] } ], + "summary": "Delete notifications", "tags": [ "Notifications" ], - "x-immich-permission": "notification.delete", - "description": "This endpoint requires the `notification.delete` permission." + "x-immich-permission": "notification.delete" }, "get": { + "description": "Retrieve a list of notifications.", "operationId": "getNotifications", "parameters": [ { @@ -4849,13 +4999,14 @@ "api_key": [] } ], + "summary": "Retrieve notifications", "tags": [ "Notifications" ], - "x-immich-permission": "notification.read", - "description": "This endpoint requires the `notification.read` permission." + "x-immich-permission": "notification.read" }, "put": { + "description": "Update a list of notifications. Allows to bulk-set the read status of notifications.", "operationId": "updateNotifications", "parameters": [], "requestBody": { @@ -4884,15 +5035,16 @@ "api_key": [] } ], + "summary": "Update notifications", "tags": [ "Notifications" ], - "x-immich-permission": "notification.update", - "description": "This endpoint requires the `notification.update` permission." + "x-immich-permission": "notification.update" } }, "/notifications/{id}": { "delete": { + "description": "Delete a specific notification.", "operationId": "deleteNotification", "parameters": [ { @@ -4921,13 +5073,14 @@ "api_key": [] } ], + "summary": "Delete a notification", "tags": [ "Notifications" ], - "x-immich-permission": "notification.delete", - "description": "This endpoint requires the `notification.delete` permission." + "x-immich-permission": "notification.delete" }, "get": { + "description": "Retrieve a specific notification identified by id.", "operationId": "getNotification", "parameters": [ { @@ -4963,13 +5116,14 @@ "api_key": [] } ], + "summary": "Get a notification", "tags": [ "Notifications" ], - "x-immich-permission": "notification.read", - "description": "This endpoint requires the `notification.read` permission." + "x-immich-permission": "notification.read" }, "put": { + "description": "Update a specific notification to set its read status.", "operationId": "updateNotification", "parameters": [ { @@ -5015,15 +5169,16 @@ "api_key": [] } ], + "summary": "Update a notification", "tags": [ "Notifications" ], - "x-immich-permission": "notification.update", - "description": "This endpoint requires the `notification.update` permission." + "x-immich-permission": "notification.update" } }, "/oauth/authorize": { "post": { + "description": "Initiate the OAuth authorization process.", "operationId": "startOAuth", "parameters": [], "requestBody": { @@ -5048,13 +5203,15 @@ "description": "" } }, + "summary": "Start OAuth", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/callback": { "post": { + "description": "Complete the OAuth authorization process by exchanging the authorization code for a session token.", "operationId": "finishOAuth", "parameters": [], "requestBody": { @@ -5079,13 +5236,15 @@ "description": "" } }, + "summary": "Finish OAuth", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/link": { "post": { + "description": "Link an OAuth account to the authenticated user.", "operationId": "linkOAuthAccount", "parameters": [], "requestBody": { @@ -5121,13 +5280,15 @@ "api_key": [] } ], + "summary": "Link OAuth account", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/mobile-redirect": { "get": { + "description": "Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.", "operationId": "redirectOAuthToMobile", "parameters": [], "responses": { @@ -5135,13 +5296,15 @@ "description": "" } }, + "summary": "Redirect OAuth to mobile", "tags": [ - "OAuth" + "Authentication" ] } }, "/oauth/unlink": { "post": { + "description": "Unlink the OAuth account from the authenticated user.", "operationId": "unlinkOAuthAccount", "parameters": [], "responses": { @@ -5167,13 +5330,15 @@ "api_key": [] } ], + "summary": "Unlink OAuth account", "tags": [ - "OAuth" + "Authentication" ] } }, "/partners": { "get": { + "description": "Retrieve a list of partners with whom assets are shared.", "operationId": "getPartners", "parameters": [ { @@ -5211,13 +5376,14 @@ "api_key": [] } ], + "summary": "Retrieve partners", "tags": [ "Partners" ], - "x-immich-permission": "partner.read", - "description": "This endpoint requires the `partner.read` permission." + "x-immich-permission": "partner.read" }, "post": { + "description": "Create a new partner to share assets with.", "operationId": "createPartner", "parameters": [], "requestBody": { @@ -5253,15 +5419,16 @@ "api_key": [] } ], + "summary": "Create a partner", "tags": [ "Partners" ], - "x-immich-permission": "partner.create", - "description": "This endpoint requires the `partner.create` permission." + "x-immich-permission": "partner.create" } }, "/partners/{id}": { "delete": { + "description": "Stop sharing assets with a partner.", "operationId": "removePartner", "parameters": [ { @@ -5290,15 +5457,15 @@ "api_key": [] } ], + "summary": "Remove a partner", "tags": [ "Partners" ], - "x-immich-permission": "partner.delete", - "description": "This endpoint requires the `partner.delete` permission." + "x-immich-permission": "partner.delete" }, "post": { "deprecated": true, - "description": "This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission.", + "description": "This property was deprecated in v1.141.0. Create a new partner to share assets with.", "operationId": "createPartnerDeprecated", "parameters": [ { @@ -5334,6 +5501,7 @@ "api_key": [] } ], + "summary": "Create a partner", "tags": [ "Partners", "Deprecated" @@ -5344,6 +5512,7 @@ "x-immich-permission": "partner.create" }, "put": { + "description": "Specify whether a partner's assets should appear in the user's timeline.", "operationId": "updatePartner", "parameters": [ { @@ -5389,15 +5558,16 @@ "api_key": [] } ], + "summary": "Update a partner", "tags": [ "Partners" ], - "x-immich-permission": "partner.update", - "description": "This endpoint requires the `partner.update` permission." + "x-immich-permission": "partner.update" } }, "/people": { "delete": { + "description": "Bulk delete a list of people at once.", "operationId": "deletePeople", "parameters": [], "requestBody": { @@ -5426,13 +5596,14 @@ "api_key": [] } ], + "summary": "Delete people", "tags": [ "People" ], - "x-immich-permission": "person.delete", - "description": "This endpoint requires the `person.delete` permission." + "x-immich-permission": "person.delete" }, "get": { + "description": "Retrieve a list of all people.", "operationId": "getAllPeople", "parameters": [ { @@ -5508,13 +5679,14 @@ "api_key": [] } ], + "summary": "Get all people", "tags": [ "People" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" }, "post": { + "description": "Create a new person that can have multiple faces assigned to them.", "operationId": "createPerson", "parameters": [], "requestBody": { @@ -5550,13 +5722,14 @@ "api_key": [] } ], + "summary": "Create a person", "tags": [ "People" ], - "x-immich-permission": "person.create", - "description": "This endpoint requires the `person.create` permission." + "x-immich-permission": "person.create" }, "put": { + "description": "Bulk update multiple people at once.", "operationId": "updatePeople", "parameters": [], "requestBody": { @@ -5595,15 +5768,16 @@ "api_key": [] } ], + "summary": "Update people", "tags": [ "People" ], - "x-immich-permission": "person.update", - "description": "This endpoint requires the `person.update` permission." + "x-immich-permission": "person.update" } }, "/people/{id}": { "delete": { + "description": "Delete an individual person.", "operationId": "deletePerson", "parameters": [ { @@ -5632,13 +5806,14 @@ "api_key": [] } ], + "summary": "Delete person", "tags": [ "People" ], - "x-immich-permission": "person.delete", - "description": "This endpoint requires the `person.delete` permission." + "x-immich-permission": "person.delete" }, "get": { + "description": "Retrieve a person by id.", "operationId": "getPerson", "parameters": [ { @@ -5674,13 +5849,14 @@ "api_key": [] } ], + "summary": "Get a person", "tags": [ "People" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" }, "put": { + "description": "Update an individual person.", "operationId": "updatePerson", "parameters": [ { @@ -5726,15 +5902,16 @@ "api_key": [] } ], + "summary": "Update person", "tags": [ "People" ], - "x-immich-permission": "person.update", - "description": "This endpoint requires the `person.update` permission." + "x-immich-permission": "person.update" } }, "/people/{id}/merge": { "post": { + "description": "Merge a list of people into the person specified in the path parameter.", "operationId": "mergePerson", "parameters": [ { @@ -5783,15 +5960,16 @@ "api_key": [] } ], + "summary": "Merge people", "tags": [ "People" ], - "x-immich-permission": "person.merge", - "description": "This endpoint requires the `person.merge` permission." + "x-immich-permission": "person.merge" } }, "/people/{id}/reassign": { "put": { + "description": "Bulk reassign a list of faces to a different person.", "operationId": "reassignFaces", "parameters": [ { @@ -5840,15 +6018,16 @@ "api_key": [] } ], + "summary": "Reassign faces", "tags": [ "People" ], - "x-immich-permission": "person.reassign", - "description": "This endpoint requires the `person.reassign` permission." + "x-immich-permission": "person.reassign" } }, "/people/{id}/statistics": { "get": { + "description": "Retrieve statistics about a specific person.", "operationId": "getPersonStatistics", "parameters": [ { @@ -5884,15 +6063,16 @@ "api_key": [] } ], + "summary": "Get person statistics", "tags": [ "People" ], - "x-immich-permission": "person.statistics", - "description": "This endpoint requires the `person.statistics` permission." + "x-immich-permission": "person.statistics" } }, "/people/{id}/thumbnail": { "get": { + "description": "Retrieve the thumbnail file for a person.", "operationId": "getPersonThumbnail", "parameters": [ { @@ -5929,15 +6109,16 @@ "api_key": [] } ], + "summary": "Get person thumbnail", "tags": [ "People" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" } }, "/search/cities": { "get": { + "description": "Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.", "operationId": "getAssetsByCity", "parameters": [], "responses": { @@ -5966,15 +6147,16 @@ "api_key": [] } ], + "summary": "Retrieve assets by city", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/explore": { "get": { + "description": "Retrieve data for the explore section, such as popular people and places.", "operationId": "getExploreData", "parameters": [], "responses": { @@ -6003,15 +6185,16 @@ "api_key": [] } ], + "summary": "Retrieve explore data", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/large-assets": { "post": { + "description": "Search for assets that are considered large based on specified criteria.", "operationId": "searchLargeAssets", "parameters": [ { @@ -6330,15 +6513,16 @@ "api_key": [] } ], + "summary": "Search large assets", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/metadata": { "post": { + "description": "Search for assets based on various metadata criteria.", "operationId": "searchAssets", "parameters": [], "requestBody": { @@ -6374,15 +6558,16 @@ "api_key": [] } ], + "summary": "Search assets by metadata", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/person": { "get": { + "description": "Search for people by name.", "operationId": "searchPerson", "parameters": [ { @@ -6428,15 +6613,16 @@ "api_key": [] } ], + "summary": "Search people", "tags": [ "Search" ], - "x-immich-permission": "person.read", - "description": "This endpoint requires the `person.read` permission." + "x-immich-permission": "person.read" } }, "/search/places": { "get": { + "description": "Search for places by name.", "operationId": "searchPlaces", "parameters": [ { @@ -6474,15 +6660,16 @@ "api_key": [] } ], + "summary": "Search places", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/random": { "post": { + "description": "Retrieve a random selection of assets based on the provided criteria.", "operationId": "searchRandom", "parameters": [], "requestBody": { @@ -6521,15 +6708,16 @@ "api_key": [] } ], + "summary": "Search random assets", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/smart": { "post": { + "description": "Perform a smart search for assets by using machine learning vectors to determine relevance.", "operationId": "searchSmart", "parameters": [], "requestBody": { @@ -6565,15 +6753,16 @@ "api_key": [] } ], + "summary": "Smart asset search", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/search/statistics": { "post": { + "description": "Retrieve statistical data about assets based on search criteria, such as the total matching count.", "operationId": "searchAssetStatistics", "parameters": [], "requestBody": { @@ -6609,15 +6798,16 @@ "api_key": [] } ], + "summary": "Search asset statistics", "tags": [ "Search" ], - "x-immich-permission": "asset.statistics", - "description": "This endpoint requires the `asset.statistics` permission." + "x-immich-permission": "asset.statistics" } }, "/search/suggestions": { "get": { + "description": "Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.", "operationId": "getSearchSuggestions", "parameters": [ { @@ -6704,15 +6894,16 @@ "api_key": [] } ], + "summary": "Retrieve search suggestions", "tags": [ "Search" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/server/about": { "get": { + "description": "Retrieve a list of information about the server.", "operationId": "getAboutInfo", "parameters": [], "responses": { @@ -6738,15 +6929,16 @@ "api_key": [] } ], + "summary": "Get server information", "tags": [ "Server" ], - "x-immich-permission": "server.about", - "description": "This endpoint requires the `server.about` permission." + "x-immich-permission": "server.about" } }, "/server/apk-links": { "get": { + "description": "Retrieve links to the APKs for the current server version.", "operationId": "getApkLinks", "parameters": [], "responses": { @@ -6772,15 +6964,16 @@ "api_key": [] } ], + "summary": "Get APK links", "tags": [ "Server" ], - "x-immich-permission": "server.apkLinks", - "description": "This endpoint requires the `server.apkLinks` permission." + "x-immich-permission": "server.apkLinks" } }, "/server/config": { "get": { + "description": "Retrieve the current server configuration.", "operationId": "getServerConfig", "parameters": [], "responses": { @@ -6795,6 +6988,7 @@ "description": "" } }, + "summary": "Get config", "tags": [ "Server" ] @@ -6802,6 +6996,7 @@ }, "/server/features": { "get": { + "description": "Retrieve available features supported by this server.", "operationId": "getServerFeatures", "parameters": [], "responses": { @@ -6816,6 +7011,7 @@ "description": "" } }, + "summary": "Get features", "tags": [ "Server" ] @@ -6823,6 +7019,7 @@ }, "/server/license": { "delete": { + "description": "Delete the currently set server product key.", "operationId": "deleteServerLicense", "parameters": [], "responses": { @@ -6841,14 +7038,15 @@ "api_key": [] } ], + "summary": "Delete server product key", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "serverLicense.delete", - "description": "This endpoint is an admin-only route, and requires the `serverLicense.delete` permission." + "x-immich-permission": "serverLicense.delete" }, "get": { + "description": "Retrieve information about whether the server currently has a product key registered.", "operationId": "getServerLicense", "parameters": [], "responses": { @@ -6877,14 +7075,15 @@ "api_key": [] } ], + "summary": "Get product key", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "serverLicense.read", - "description": "This endpoint is an admin-only route, and requires the `serverLicense.read` permission." + "x-immich-permission": "serverLicense.read" }, "put": { + "description": "Validate and set the server product key if successful.", "operationId": "setServerLicense", "parameters": [], "requestBody": { @@ -6920,16 +7119,17 @@ "api_key": [] } ], + "summary": "Set server product key", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "serverLicense.update", - "description": "This endpoint is an admin-only route, and requires the `serverLicense.update` permission." + "x-immich-permission": "serverLicense.update" } }, "/server/media-types": { "get": { + "description": "Retrieve all media types supported by the server.", "operationId": "getSupportedMediaTypes", "parameters": [], "responses": { @@ -6944,6 +7144,7 @@ "description": "" } }, + "summary": "Get supported media types", "tags": [ "Server" ] @@ -6951,6 +7152,7 @@ }, "/server/ping": { "get": { + "description": "Pong", "operationId": "pingServer", "parameters": [], "responses": { @@ -6965,6 +7167,7 @@ "description": "" } }, + "summary": "Ping", "tags": [ "Server" ] @@ -6972,6 +7175,7 @@ }, "/server/statistics": { "get": { + "description": "Retrieve statistics about the entire Immich instance such as asset counts.", "operationId": "getServerStatistics", "parameters": [], "responses": { @@ -6997,16 +7201,17 @@ "api_key": [] } ], + "summary": "Get statistics", "tags": [ "Server" ], "x-immich-admin-only": true, - "x-immich-permission": "server.statistics", - "description": "This endpoint is an admin-only route, and requires the `server.statistics` permission." + "x-immich-permission": "server.statistics" } }, "/server/storage": { "get": { + "description": "Retrieve the current storage utilization information of the server.", "operationId": "getStorage", "parameters": [], "responses": { @@ -7032,15 +7237,16 @@ "api_key": [] } ], + "summary": "Get storage", "tags": [ "Server" ], - "x-immich-permission": "server.storage", - "description": "This endpoint requires the `server.storage` permission." + "x-immich-permission": "server.storage" } }, "/server/theme": { "get": { + "description": "Retrieve the custom CSS, if existent.", "operationId": "getTheme", "parameters": [], "responses": { @@ -7055,6 +7261,7 @@ "description": "" } }, + "summary": "Get theme", "tags": [ "Server" ] @@ -7062,6 +7269,7 @@ }, "/server/version": { "get": { + "description": "Retrieve the current server version in semantic versioning (semver) format.", "operationId": "getServerVersion", "parameters": [], "responses": { @@ -7076,6 +7284,7 @@ "description": "" } }, + "summary": "Get server version", "tags": [ "Server" ] @@ -7083,6 +7292,7 @@ }, "/server/version-check": { "get": { + "description": "Retrieve information about the last time the version check ran.", "operationId": "getVersionCheck", "parameters": [], "responses": { @@ -7108,15 +7318,16 @@ "api_key": [] } ], + "summary": "Get version check status", "tags": [ "Server" ], - "x-immich-permission": "server.versionCheck", - "description": "This endpoint requires the `server.versionCheck` permission." + "x-immich-permission": "server.versionCheck" } }, "/server/version-history": { "get": { + "description": "Retrieve a list of past versions the server has been on.", "operationId": "getVersionHistory", "parameters": [], "responses": { @@ -7134,6 +7345,7 @@ "description": "" } }, + "summary": "Get version history", "tags": [ "Server" ] @@ -7141,6 +7353,7 @@ }, "/sessions": { "delete": { + "description": "Delete all sessions for the user. This will not delete the current session.", "operationId": "deleteAllSessions", "parameters": [], "responses": { @@ -7159,13 +7372,14 @@ "api_key": [] } ], + "summary": "Delete all sessions", "tags": [ "Sessions" ], - "x-immich-permission": "session.delete", - "description": "This endpoint requires the `session.delete` permission." + "x-immich-permission": "session.delete" }, "get": { + "description": "Retrieve a list of sessions for the user.", "operationId": "getSessions", "parameters": [], "responses": { @@ -7194,13 +7408,14 @@ "api_key": [] } ], + "summary": "Retrieve sessions", "tags": [ "Sessions" ], - "x-immich-permission": "session.read", - "description": "This endpoint requires the `session.read` permission." + "x-immich-permission": "session.read" }, "post": { + "description": "Create a session as a child to the current session. This endpoint is used for casting.", "operationId": "createSession", "parameters": [], "requestBody": { @@ -7236,15 +7451,16 @@ "api_key": [] } ], + "summary": "Create a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.create", - "description": "This endpoint requires the `session.create` permission." + "x-immich-permission": "session.create" } }, "/sessions/{id}": { "delete": { + "description": "Delete a specific session by id.", "operationId": "deleteSession", "parameters": [ { @@ -7273,13 +7489,14 @@ "api_key": [] } ], + "summary": "Delete a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.delete", - "description": "This endpoint requires the `session.delete` permission." + "x-immich-permission": "session.delete" }, "put": { + "description": "Update a specific session identified by id.", "operationId": "updateSession", "parameters": [ { @@ -7325,15 +7542,16 @@ "api_key": [] } ], + "summary": "Update a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.update", - "description": "This endpoint requires the `session.update` permission." + "x-immich-permission": "session.update" } }, "/sessions/{id}/lock": { "post": { + "description": "Lock a specific session by id.", "operationId": "lockSession", "parameters": [ { @@ -7362,15 +7580,16 @@ "api_key": [] } ], + "summary": "Lock a session", "tags": [ "Sessions" ], - "x-immich-permission": "session.lock", - "description": "This endpoint requires the `session.lock` permission." + "x-immich-permission": "session.lock" } }, "/shared-links": { "get": { + "description": "Retrieve a list of all shared links.", "operationId": "getAllSharedLinks", "parameters": [ { @@ -7409,13 +7628,14 @@ "api_key": [] } ], + "summary": "Retrieve all shared links", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.read", - "description": "This endpoint requires the `sharedLink.read` permission." + "x-immich-permission": "sharedLink.read" }, "post": { + "description": "Create a new shared link.", "operationId": "createSharedLink", "parameters": [], "requestBody": { @@ -7451,17 +7671,26 @@ "api_key": [] } ], + "summary": "Create a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.create", - "description": "This endpoint requires the `sharedLink.create` permission." + "x-immich-permission": "sharedLink.create" } }, "/shared-links/me": { "get": { + "description": "Retrieve the current shared link associated with authentication method.", "operationId": "getMySharedLink", "parameters": [ + { + "name": "key", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, { "name": "password", "required": false, @@ -7471,22 +7700,6 @@ "type": "string" } }, - { - "name": "token", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, { "name": "slug", "required": false, @@ -7494,6 +7707,14 @@ "schema": { "type": "string" } + }, + { + "name": "token", + "required": false, + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { @@ -7519,13 +7740,15 @@ "api_key": [] } ], + "summary": "Retrieve current shared link", "tags": [ - "Shared Links" + "Shared links" ] } }, "/shared-links/{id}": { "delete": { + "description": "Delete a specific shared link by its ID.", "operationId": "removeSharedLink", "parameters": [ { @@ -7554,13 +7777,14 @@ "api_key": [] } ], + "summary": "Delete a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.delete", - "description": "This endpoint requires the `sharedLink.delete` permission." + "x-immich-permission": "sharedLink.delete" }, "get": { + "description": "Retrieve a specific shared link by its ID.", "operationId": "getSharedLinkById", "parameters": [ { @@ -7596,13 +7820,14 @@ "api_key": [] } ], + "summary": "Retrieve a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.read", - "description": "This endpoint requires the `sharedLink.read` permission." + "x-immich-permission": "sharedLink.read" }, "patch": { + "description": "Update an existing shared link by its ID.", "operationId": "updateSharedLink", "parameters": [ { @@ -7648,15 +7873,16 @@ "api_key": [] } ], + "summary": "Update a shared link", "tags": [ - "Shared Links" + "Shared links" ], - "x-immich-permission": "sharedLink.update", - "description": "This endpoint requires the `sharedLink.update` permission." + "x-immich-permission": "sharedLink.update" } }, "/shared-links/{id}/assets": { "delete": { + "description": "Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.", "operationId": "removeSharedLinkAssets", "parameters": [ { @@ -7721,11 +7947,13 @@ "api_key": [] } ], + "summary": "Remove assets from a shared link", "tags": [ - "Shared Links" + "Shared links" ] }, "put": { + "description": "Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.", "operationId": "addSharedLinkAssets", "parameters": [ { @@ -7790,13 +8018,15 @@ "api_key": [] } ], + "summary": "Add assets to a shared link", "tags": [ - "Shared Links" + "Shared links" ] } }, "/stacks": { "delete": { + "description": "Delete multiple stacks by providing a list of stack IDs.", "operationId": "deleteStacks", "parameters": [], "requestBody": { @@ -7825,13 +8055,14 @@ "api_key": [] } ], + "summary": "Delete stacks", "tags": [ "Stacks" ], - "x-immich-permission": "stack.delete", - "description": "This endpoint requires the `stack.delete` permission." + "x-immich-permission": "stack.delete" }, "get": { + "description": "Retrieve a list of stacks.", "operationId": "searchStacks", "parameters": [ { @@ -7870,13 +8101,14 @@ "api_key": [] } ], + "summary": "Retrieve stacks", "tags": [ "Stacks" ], - "x-immich-permission": "stack.read", - "description": "This endpoint requires the `stack.read` permission." + "x-immich-permission": "stack.read" }, "post": { + "description": "Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.", "operationId": "createStack", "parameters": [], "requestBody": { @@ -7912,15 +8144,16 @@ "api_key": [] } ], + "summary": "Create a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.create", - "description": "This endpoint requires the `stack.create` permission." + "x-immich-permission": "stack.create" } }, "/stacks/{id}": { "delete": { + "description": "Delete a specific stack by its ID.", "operationId": "deleteStack", "parameters": [ { @@ -7949,13 +8182,14 @@ "api_key": [] } ], + "summary": "Delete a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.delete", - "description": "This endpoint requires the `stack.delete` permission." + "x-immich-permission": "stack.delete" }, "get": { + "description": "Retrieve a specific stack by its ID.", "operationId": "getStack", "parameters": [ { @@ -7991,13 +8225,14 @@ "api_key": [] } ], + "summary": "Retrieve a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.read", - "description": "This endpoint requires the `stack.read` permission." + "x-immich-permission": "stack.read" }, "put": { + "description": "Update an existing stack by its ID.", "operationId": "updateStack", "parameters": [ { @@ -8043,15 +8278,16 @@ "api_key": [] } ], + "summary": "Update a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.update", - "description": "This endpoint requires the `stack.update` permission." + "x-immich-permission": "stack.update" } }, "/stacks/{id}/assets/{assetId}": { "delete": { + "description": "Remove a specific asset from a stack by providing the stack ID and asset ID.", "operationId": "removeAssetFromStack", "parameters": [ { @@ -8089,15 +8325,16 @@ "api_key": [] } ], + "summary": "Remove an asset from a stack", "tags": [ "Stacks" ], - "x-immich-permission": "stack.update", - "description": "This endpoint requires the `stack.update` permission." + "x-immich-permission": "stack.update" } }, "/sync/ack": { "delete": { + "description": "Delete specific synchronization acknowledgments.", "operationId": "deleteSyncAck", "parameters": [], "requestBody": { @@ -8126,13 +8363,14 @@ "api_key": [] } ], + "summary": "Delete acknowledgements", "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.delete", - "description": "This endpoint requires the `syncCheckpoint.delete` permission." + "x-immich-permission": "syncCheckpoint.delete" }, "get": { + "description": "Retrieve the synchronization acknowledgments for the current session.", "operationId": "getSyncAck", "parameters": [], "responses": { @@ -8161,13 +8399,14 @@ "api_key": [] } ], + "summary": "Retrieve acknowledgements", "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.read", - "description": "This endpoint requires the `syncCheckpoint.read` permission." + "x-immich-permission": "syncCheckpoint.read" }, "post": { + "description": "Send a list of synchronization acknowledgements to confirm that the latest changes have been received.", "operationId": "sendSyncAck", "parameters": [], "requestBody": { @@ -8196,15 +8435,17 @@ "api_key": [] } ], + "summary": "Acknowledge changes", "tags": [ "Sync" ], - "x-immich-permission": "syncCheckpoint.update", - "description": "This endpoint requires the `syncCheckpoint.update` permission." + "x-immich-permission": "syncCheckpoint.update" } }, "/sync/delta-sync": { "post": { + "deprecated": true, + "description": "This property was deprecated in v2.0.0. Retrieve changed assets since the last sync for the authenticated user.", "operationId": "getDeltaSync", "parameters": [], "requestBody": { @@ -8240,13 +8481,20 @@ "api_key": [] } ], + "summary": "Get delta sync for user", "tags": [ - "Sync" - ] + "Sync", + "Deprecated" + ], + "x-immich-lifecycle": { + "deprecatedAt": "v2.0.0" + } } }, "/sync/full-sync": { "post": { + "deprecated": true, + "description": "This property was deprecated in v2.0.0. Retrieve all assets for a full synchronization for the authenticated user.", "operationId": "getFullSyncForUser", "parameters": [], "requestBody": { @@ -8285,13 +8533,19 @@ "api_key": [] } ], + "summary": "Get full sync for user", "tags": [ - "Sync" - ] + "Sync", + "Deprecated" + ], + "x-immich-lifecycle": { + "deprecatedAt": "v2.0.0" + } } }, "/sync/stream": { "post": { + "description": "Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.", "operationId": "getSyncStream", "parameters": [], "requestBody": { @@ -8320,15 +8574,16 @@ "api_key": [] } ], + "summary": "Stream sync changes", "tags": [ "Sync" ], - "x-immich-permission": "sync.stream", - "description": "This endpoint requires the `sync.stream` permission." + "x-immich-permission": "sync.stream" } }, "/system-config": { "get": { + "description": "Retrieve the current system configuration.", "operationId": "getConfig", "parameters": [], "responses": { @@ -8354,14 +8609,15 @@ "api_key": [] } ], + "summary": "Get system configuration", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.read", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." + "x-immich-permission": "systemConfig.read" }, "put": { + "description": "Update the system configuration with a new system configuration.", "operationId": "updateConfig", "parameters": [], "requestBody": { @@ -8397,16 +8653,17 @@ "api_key": [] } ], + "summary": "Update system configuration", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.update", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.update` permission." + "x-immich-permission": "systemConfig.update" } }, "/system-config/defaults": { "get": { + "description": "Retrieve the default values for the system configuration.", "operationId": "getConfigDefaults", "parameters": [], "responses": { @@ -8432,16 +8689,17 @@ "api_key": [] } ], + "summary": "Get system configuration defaults", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.read", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." + "x-immich-permission": "systemConfig.read" } }, "/system-config/storage-template-options": { "get": { + "description": "Retrieve exemplary storage template options.", "operationId": "getStorageTemplateOptions", "parameters": [], "responses": { @@ -8467,16 +8725,17 @@ "api_key": [] } ], + "summary": "Get storage template options", "tags": [ - "System Config" + "System config" ], "x-immich-admin-only": true, - "x-immich-permission": "systemConfig.read", - "description": "This endpoint is an admin-only route, and requires the `systemConfig.read` permission." + "x-immich-permission": "systemConfig.read" } }, "/system-metadata/admin-onboarding": { "get": { + "description": "Retrieve the current admin onboarding status.", "operationId": "getAdminOnboarding", "parameters": [], "responses": { @@ -8502,14 +8761,15 @@ "api_key": [] } ], + "summary": "Retrieve admin onboarding", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.read", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." + "x-immich-permission": "systemMetadata.read" }, "post": { + "description": "Update the admin onboarding status.", "operationId": "updateAdminOnboarding", "parameters": [], "requestBody": { @@ -8538,16 +8798,17 @@ "api_key": [] } ], + "summary": "Update admin onboarding", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.update", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.update` permission." + "x-immich-permission": "systemMetadata.update" } }, "/system-metadata/reverse-geocoding-state": { "get": { + "description": "Retrieve the current state of the reverse geocoding import.", "operationId": "getReverseGeocodingState", "parameters": [], "responses": { @@ -8573,16 +8834,17 @@ "api_key": [] } ], + "summary": "Retrieve reverse geocoding state", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.read", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." + "x-immich-permission": "systemMetadata.read" } }, "/system-metadata/version-check-state": { "get": { + "description": "Retrieve the current state of the version check process.", "operationId": "getVersionCheckState", "parameters": [], "responses": { @@ -8608,16 +8870,17 @@ "api_key": [] } ], + "summary": "Retrieve version check state", "tags": [ - "System Metadata" + "System metadata" ], "x-immich-admin-only": true, - "x-immich-permission": "systemMetadata.read", - "description": "This endpoint is an admin-only route, and requires the `systemMetadata.read` permission." + "x-immich-permission": "systemMetadata.read" } }, "/tags": { "get": { + "description": "Retrieve a list of all tags.", "operationId": "getAllTags", "parameters": [], "responses": { @@ -8646,13 +8909,14 @@ "api_key": [] } ], + "summary": "Retrieve tags", "tags": [ "Tags" ], - "x-immich-permission": "tag.read", - "description": "This endpoint requires the `tag.read` permission." + "x-immich-permission": "tag.read" }, "post": { + "description": "Create a new tag by providing a name and optional color.", "operationId": "createTag", "parameters": [], "requestBody": { @@ -8688,13 +8952,14 @@ "api_key": [] } ], + "summary": "Create a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.create", - "description": "This endpoint requires the `tag.create` permission." + "x-immich-permission": "tag.create" }, "put": { + "description": "Create or update multiple tags in a single request.", "operationId": "upsertTags", "parameters": [], "requestBody": { @@ -8733,15 +8998,16 @@ "api_key": [] } ], + "summary": "Upsert tags", "tags": [ "Tags" ], - "x-immich-permission": "tag.create", - "description": "This endpoint requires the `tag.create` permission." + "x-immich-permission": "tag.create" } }, "/tags/assets": { "put": { + "description": "Add multiple tags to multiple assets in a single request.", "operationId": "bulkTagAssets", "parameters": [], "requestBody": { @@ -8777,15 +9043,16 @@ "api_key": [] } ], + "summary": "Tag assets", "tags": [ "Tags" ], - "x-immich-permission": "tag.asset", - "description": "This endpoint requires the `tag.asset` permission." + "x-immich-permission": "tag.asset" } }, "/tags/{id}": { "delete": { + "description": "Delete a specific tag by its ID.", "operationId": "deleteTag", "parameters": [ { @@ -8814,13 +9081,14 @@ "api_key": [] } ], + "summary": "Delete a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.delete", - "description": "This endpoint requires the `tag.delete` permission." + "x-immich-permission": "tag.delete" }, "get": { + "description": "Retrieve a specific tag by its ID.", "operationId": "getTagById", "parameters": [ { @@ -8856,13 +9124,14 @@ "api_key": [] } ], + "summary": "Retrieve a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.read", - "description": "This endpoint requires the `tag.read` permission." + "x-immich-permission": "tag.read" }, "put": { + "description": "Update an existing tag identified by its ID.", "operationId": "updateTag", "parameters": [ { @@ -8908,15 +9177,16 @@ "api_key": [] } ], + "summary": "Update a tag", "tags": [ "Tags" ], - "x-immich-permission": "tag.update", - "description": "This endpoint requires the `tag.update` permission." + "x-immich-permission": "tag.update" } }, "/tags/{id}/assets": { "delete": { + "description": "Remove a tag from all the specified assets.", "operationId": "untagAssets", "parameters": [ { @@ -8965,13 +9235,14 @@ "api_key": [] } ], + "summary": "Untag assets", "tags": [ "Tags" ], - "x-immich-permission": "tag.asset", - "description": "This endpoint requires the `tag.asset` permission." + "x-immich-permission": "tag.asset" }, "put": { + "description": "Add a tag to all the specified assets.", "operationId": "tagAssets", "parameters": [ { @@ -9020,15 +9291,16 @@ "api_key": [] } ], + "summary": "Tag assets", "tags": [ "Tags" ], - "x-immich-permission": "tag.asset", - "description": "This endpoint requires the `tag.asset` permission." + "x-immich-permission": "tag.asset" } }, "/timeline/bucket": { "get": { + "description": "Retrieve a string of all asset ids in a given time bucket.", "operationId": "getTimeBucket", "parameters": [ { @@ -9184,15 +9456,16 @@ "api_key": [] } ], + "summary": "Get time bucket", "tags": [ "Timeline" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/timeline/buckets": { "get": { + "description": "Retrieve a list of all minimal time buckets.", "operationId": "getTimeBuckets", "parameters": [ { @@ -9341,15 +9614,16 @@ "api_key": [] } ], + "summary": "Get time buckets", "tags": [ "Timeline" ], - "x-immich-permission": "asset.read", - "description": "This endpoint requires the `asset.read` permission." + "x-immich-permission": "asset.read" } }, "/trash/empty": { "post": { + "description": "Permanently delete all items in the trash.", "operationId": "emptyTrash", "parameters": [], "responses": { @@ -9375,15 +9649,16 @@ "api_key": [] } ], + "summary": "Empty trash", "tags": [ "Trash" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" } }, "/trash/restore": { "post": { + "description": "Restore all items in the trash.", "operationId": "restoreTrash", "parameters": [], "responses": { @@ -9409,15 +9684,16 @@ "api_key": [] } ], + "summary": "Restore trash", "tags": [ "Trash" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" } }, "/trash/restore/assets": { "post": { + "description": "Restore specific assets from the trash.", "operationId": "restoreAssets", "parameters": [], "requestBody": { @@ -9453,15 +9729,16 @@ "api_key": [] } ], + "summary": "Restore assets", "tags": [ "Trash" ], - "x-immich-permission": "asset.delete", - "description": "This endpoint requires the `asset.delete` permission." + "x-immich-permission": "asset.delete" } }, "/users": { "get": { + "description": "Retrieve a list of all users on the server.", "operationId": "searchUsers", "parameters": [], "responses": { @@ -9490,15 +9767,16 @@ "api_key": [] } ], + "summary": "Get all users", "tags": [ "Users" ], - "x-immich-permission": "user.read", - "description": "This endpoint requires the `user.read` permission." + "x-immich-permission": "user.read" } }, "/users/me": { "get": { + "description": "Retrieve information about the user making the API request.", "operationId": "getMyUser", "parameters": [], "responses": { @@ -9524,13 +9802,14 @@ "api_key": [] } ], + "summary": "Get current user", "tags": [ "Users" ], - "x-immich-permission": "user.read", - "description": "This endpoint requires the `user.read` permission." + "x-immich-permission": "user.read" }, "put": { + "description": "Update the current user making teh API request.", "operationId": "updateMyUser", "parameters": [], "requestBody": { @@ -9566,15 +9845,16 @@ "api_key": [] } ], + "summary": "Update current user", "tags": [ "Users" ], - "x-immich-permission": "user.update", - "description": "This endpoint requires the `user.update` permission." + "x-immich-permission": "user.update" } }, "/users/me/license": { "delete": { + "description": "Delete the registered product key for the current user.", "operationId": "deleteUserLicense", "parameters": [], "responses": { @@ -9593,13 +9873,14 @@ "api_key": [] } ], + "summary": "Delete user product key", "tags": [ "Users" ], - "x-immich-permission": "userLicense.delete", - "description": "This endpoint requires the `userLicense.delete` permission." + "x-immich-permission": "userLicense.delete" }, "get": { + "description": "Retrieve information about whether the current user has a registered product key.", "operationId": "getUserLicense", "parameters": [], "responses": { @@ -9625,13 +9906,14 @@ "api_key": [] } ], + "summary": "Retrieve user product key", "tags": [ "Users" ], - "x-immich-permission": "userLicense.read", - "description": "This endpoint requires the `userLicense.read` permission." + "x-immich-permission": "userLicense.read" }, "put": { + "description": "Register a product key for the current user.", "operationId": "setUserLicense", "parameters": [], "requestBody": { @@ -9667,15 +9949,16 @@ "api_key": [] } ], + "summary": "Set user product key", "tags": [ "Users" ], - "x-immich-permission": "userLicense.update", - "description": "This endpoint requires the `userLicense.update` permission." + "x-immich-permission": "userLicense.update" } }, "/users/me/onboarding": { "delete": { + "description": "Delete the onboarding status of the current user.", "operationId": "deleteUserOnboarding", "parameters": [], "responses": { @@ -9694,13 +9977,14 @@ "api_key": [] } ], + "summary": "Delete user onboarding", "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.delete", - "description": "This endpoint requires the `userOnboarding.delete` permission." + "x-immich-permission": "userOnboarding.delete" }, "get": { + "description": "Retrieve the onboarding status of the current user.", "operationId": "getUserOnboarding", "parameters": [], "responses": { @@ -9726,13 +10010,14 @@ "api_key": [] } ], + "summary": "Retrieve user onboarding", "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.read", - "description": "This endpoint requires the `userOnboarding.read` permission." + "x-immich-permission": "userOnboarding.read" }, "put": { + "description": "Update the onboarding status of the current user.", "operationId": "setUserOnboarding", "parameters": [], "requestBody": { @@ -9768,15 +10053,16 @@ "api_key": [] } ], + "summary": "Update user onboarding", "tags": [ "Users" ], - "x-immich-permission": "userOnboarding.update", - "description": "This endpoint requires the `userOnboarding.update` permission." + "x-immich-permission": "userOnboarding.update" } }, "/users/me/preferences": { "get": { + "description": "Retrieve the preferences for the current user.", "operationId": "getMyPreferences", "parameters": [], "responses": { @@ -9802,13 +10088,14 @@ "api_key": [] } ], + "summary": "Get my preferences", "tags": [ "Users" ], - "x-immich-permission": "userPreference.read", - "description": "This endpoint requires the `userPreference.read` permission." + "x-immich-permission": "userPreference.read" }, "put": { + "description": "Update the preferences of the current user.", "operationId": "updateMyPreferences", "parameters": [], "requestBody": { @@ -9844,15 +10131,16 @@ "api_key": [] } ], + "summary": "Update my preferences", "tags": [ "Users" ], - "x-immich-permission": "userPreference.update", - "description": "This endpoint requires the `userPreference.update` permission." + "x-immich-permission": "userPreference.update" } }, "/users/profile-image": { "delete": { + "description": "Delete the profile image of the current user.", "operationId": "deleteProfileImage", "parameters": [], "responses": { @@ -9871,13 +10159,14 @@ "api_key": [] } ], + "summary": "Delete user profile image", "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.delete", - "description": "This endpoint requires the `userProfileImage.delete` permission." + "x-immich-permission": "userProfileImage.delete" }, "post": { + "description": "Upload and set a new profile image for the current user.", "operationId": "createProfileImage", "parameters": [], "requestBody": { @@ -9914,15 +10203,16 @@ "api_key": [] } ], + "summary": "Create user profile image", "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.update", - "description": "This endpoint requires the `userProfileImage.update` permission." + "x-immich-permission": "userProfileImage.update" } }, "/users/{id}": { "get": { + "description": "Retrieve a specific user by their ID.", "operationId": "getUser", "parameters": [ { @@ -9958,15 +10248,16 @@ "api_key": [] } ], + "summary": "Retrieve a user", "tags": [ "Users" ], - "x-immich-permission": "user.read", - "description": "This endpoint requires the `user.read` permission." + "x-immich-permission": "user.read" } }, "/users/{id}/profile-image": { "get": { + "description": "Retrieve the profile image file for a user.", "operationId": "getProfileImage", "parameters": [ { @@ -10003,15 +10294,16 @@ "api_key": [] } ], + "summary": "Retrieve user profile image", "tags": [ "Users" ], - "x-immich-permission": "userProfileImage.read", - "description": "This endpoint requires the `userProfileImage.read` permission." + "x-immich-permission": "userProfileImage.read" } }, "/view/folder": { "get": { + "description": "Retrieve assets that are children of a specific folder.", "operationId": "getAssetsByOriginalPath", "parameters": [ { @@ -10049,13 +10341,15 @@ "api_key": [] } ], + "summary": "Retrieve assets by original path", "tags": [ - "View" + "Views" ] } }, "/view/folder/unique-paths": { "get": { + "description": "Retrieve a list of unique folder paths from asset original paths.", "operationId": "getUniqueOriginalPaths", "parameters": [], "responses": { @@ -10084,8 +10378,9 @@ "api_key": [] } ], + "summary": "Retrieve unique paths", "tags": [ - "View" + "Views" ] } } @@ -10093,10 +10388,139 @@ "info": { "title": "Immich", "description": "Immich API", - "version": "2.2.0", + "version": "2.2.3", "contact": {} }, - "tags": [], + "tags": [ + { + "name": "Activities", + "description": "An activity is a like or a comment made by a user on an asset or album." + }, + { + "name": "Albums", + "description": "An album is a collection of assets that can be shared with other users or via shared links." + }, + { + "name": "API keys", + "description": "An api key can be used to programmatically access the Immich API." + }, + { + "name": "Assets", + "description": "An asset is an image or video that has been uploaded to Immich." + }, + { + "name": "Authentication", + "description": "Endpoints related to user authentication, including OAuth." + }, + { + "name": "Authentication (admin)", + "description": "Administrative endpoints related to authentication." + }, + { + "name": "Deprecated", + "description": "Deprecated endpoints that are planned for removal in the next major release." + }, + { + "name": "Download", + "description": "Endpoints for downloading assets or collections of assets." + }, + { + "name": "Duplicates", + "description": "Endpoints for managing and identifying duplicate assets." + }, + { + "name": "Faces", + "description": "A face is a detected human face within an asset, which can be associated with a person. Faces are normally detected via machine learning, but can also be created via manually." + }, + { + "name": "Jobs", + "description": "Queues and background jobs are used for processing tasks asynchronously. Queues can be paused and resumed as needed." + }, + { + "name": "Libraries", + "description": "An external library is made up of input file paths or expressions that are scanned for asset files. Discovered files are automatically imported. Assets much be unique within a library, but can be duplicated across libraries. Each user has a default upload library, and can have one or more external libraries." + }, + { + "name": "Map", + "description": "Map endpoints include supplemental functionality related to geolocation, such as reverse geocoding and retrieving map markers for assets with geolocation data." + }, + { + "name": "Memories", + "description": "A memory is a specialized collection of assets with dedicated viewing implementations in the web and mobile clients. A memory includes fields related to visibility and are automatically generated per user via a background job." + }, + { + "name": "Notifications", + "description": "A notification is a specialized message sent to users to inform them of important events. Currently, these notifications are only shown in the Immich web application." + }, + { + "name": "Notifications (admin)", + "description": "Notification administrative endpoints." + }, + { + "name": "Partners", + "description": "A partner is a link with another user that allows sharing of assets between two users." + }, + { + "name": "People", + "description": "A person is a collection of faces, which can be favorited and named. A person can also be merged into another person. People are automatically created via the face recognition job." + }, + { + "name": "Search", + "description": "Endpoints related to searching assets via text, smart search, optical character recognition (OCR), and other filters like person, album, and other metadata. Search endpoints usually support pagination and sorting." + }, + { + "name": "Server", + "description": "Information about the current server deployment, including version and build information, available features, supported media types, and more." + }, + { + "name": "Sessions", + "description": "A session represents an authenticated login session for a user. Sessions also appear in the web application as \"Authorized devices\"." + }, + { + "name": "Shared links", + "description": "A shared link is a public url that provides access to a specific album, asset, or collection of assets. A shared link can be protected with a password, include a specific slug, allow or disallow downloads, and optionally include an expiration date." + }, + { + "name": "Stacks", + "description": "A stack is a group of related assets. One asset is the \"primary\" asset, and the rest are \"child\" assets. On the main timeline, stack parents are included by default, while child assets are hidden." + }, + { + "name": "Sync", + "description": "A collection of endpoints for the new mobile synchronization implementation." + }, + { + "name": "System config", + "description": "Endpoints to view, modify, and validate the system configuration settings." + }, + { + "name": "System metadata", + "description": "Endpoints to view, modify, and validate the system metadata, which includes information about things like admin onboarding status." + }, + { + "name": "Tags", + "description": "A tag is a user-defined label that can be applied to assets for organizational purposes. Tags can also be hierarchical, allowing for parent-child relationships between tags." + }, + { + "name": "Timeline", + "description": "Specialized endpoints related to the timeline implementation used in the web application. External applications or tools should not use or rely on these endpoints, as they are subject to change without notice." + }, + { + "name": "Trash", + "description": "Endpoints for managing the trash can, which includes assets that have been discarded. Items in the trash are automatically deleted after a configured amount of time." + }, + { + "name": "Users (admin)", + "description": "Administrative endpoints for managing users, including creating, updating, deleting, and restoring users. Also includes endpoints for resetting passwords and PIN codes." + }, + { + "name": "Users", + "description": "Endpoints for viewing and updating the current users, including product key information, profile picture data, onboarding progress, and more." + }, + { + "name": "Views", + "description": "Endpoints for specialized views, such as the folder view." + } + ], "servers": [ { "url": "/api" @@ -12752,18 +13176,27 @@ }, "MemoriesResponse": { "properties": { + "duration": { + "default": 5, + "type": "integer" + }, "enabled": { "default": true, "type": "boolean" } }, "required": [ + "duration", "enabled" ], "type": "object" }, "MemoriesUpdate": { "properties": { + "duration": { + "minimum": 1, + "type": "integer" + }, "enabled": { "type": "boolean" } @@ -12877,6 +13310,14 @@ ], "type": "object" }, + "MemorySearchOrder": { + "enum": [ + "asc", + "desc", + "random" + ], + "type": "string" + }, "MemoryStatisticsResponseDto": { "properties": { "total": { diff --git a/open-api/typescript-sdk/package.json b/open-api/typescript-sdk/package.json index b35311c0b1..1756675ddd 100644 --- a/open-api/typescript-sdk/package.json +++ b/open-api/typescript-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@immich/sdk", - "version": "2.2.0", + "version": "2.2.3", "description": "Auto-generated TypeScript SDK for the Immich API", "type": "module", "main": "./build/index.js", @@ -19,7 +19,7 @@ "@oazapfts/runtime": "^1.0.2" }, "devDependencies": { - "@types/node": "^22.18.12", + "@types/node": "^22.19.0", "typescript": "^5.3.3" }, "repository": { diff --git a/open-api/typescript-sdk/src/fetch-client.ts b/open-api/typescript-sdk/src/fetch-client.ts index 738bc841be..bf394704c6 100644 --- a/open-api/typescript-sdk/src/fetch-client.ts +++ b/open-api/typescript-sdk/src/fetch-client.ts @@ -1,6 +1,6 @@ /** * Immich - * 2.2.0 + * 2.2.3 * DO NOT MODIFY - This file has been generated using oazapfts. * See https://www.npmjs.com/package/oazapfts */ @@ -158,6 +158,7 @@ export type FoldersResponse = { sidebarWeb: boolean; }; export type MemoriesResponse = { + duration: number; enabled: boolean; }; export type PeopleResponse = { @@ -215,6 +216,7 @@ export type FoldersUpdate = { sidebarWeb?: boolean; }; export type MemoriesUpdate = { + duration?: number; enabled?: boolean; }; export type PeopleUpdate = { @@ -1682,7 +1684,7 @@ export type CreateProfileImageResponseDto = { userId: string; }; /** - * This endpoint requires the `activity.read` permission. + * List all activities */ export function getActivities({ albumId, assetId, level, $type, userId }: { albumId: string; @@ -1705,7 +1707,7 @@ export function getActivities({ albumId, assetId, level, $type, userId }: { })); } /** - * This endpoint requires the `activity.create` permission. + * Create an activity */ export function createActivity({ activityCreateDto }: { activityCreateDto: ActivityCreateDto; @@ -1720,7 +1722,7 @@ export function createActivity({ activityCreateDto }: { }))); } /** - * This endpoint requires the `activity.statistics` permission. + * Retrieve activity statistics */ export function getActivityStatistics({ albumId, assetId }: { albumId: string; @@ -1737,7 +1739,7 @@ export function getActivityStatistics({ albumId, assetId }: { })); } /** - * This endpoint requires the `activity.delete` permission. + * Delete an activity */ export function deleteActivity({ id }: { id: string; @@ -1748,7 +1750,7 @@ export function deleteActivity({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminAuth.unlinkAll` permission. + * Unlink all OAuth accounts */ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/admin/auth/unlink-all", { @@ -1756,9 +1758,6 @@ export function unlinkAllOAuthAccountsAdmin(opts?: Oazapfts.RequestOpts) { method: "POST" })); } -/** - * This endpoint is an admin-only route, and requires the `maintenance` permission. - */ export function endMaintenance(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/admin/maintenance/end", { ...opts, @@ -1777,15 +1776,15 @@ export function maintenanceLogin({ maintenanceLoginDto }: { body: maintenanceLoginDto }))); } -/** - * This endpoint is an admin-only route, and requires the `maintenance` permission. - */ export function startMaintenance(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/admin/maintenance/start", { ...opts, method: "POST" })); } +/** + * Create a notification + */ export function createNotification({ notificationCreateDto }: { notificationCreateDto: NotificationCreateDto; }, opts?: Oazapfts.RequestOpts) { @@ -1798,6 +1797,9 @@ export function createNotification({ notificationCreateDto }: { body: notificationCreateDto }))); } +/** + * Render email template + */ export function getNotificationTemplateAdmin({ name, templateDto }: { name: string; templateDto: TemplateDto; @@ -1811,6 +1813,9 @@ export function getNotificationTemplateAdmin({ name, templateDto }: { body: templateDto }))); } +/** + * Send test email + */ export function sendTestEmailAdmin({ systemConfigSmtpDto }: { systemConfigSmtpDto: SystemConfigSmtpDto; }, opts?: Oazapfts.RequestOpts) { @@ -1824,7 +1829,7 @@ export function sendTestEmailAdmin({ systemConfigSmtpDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Search users */ export function searchUsersAdmin({ id, withDeleted }: { id?: string; @@ -1841,7 +1846,7 @@ export function searchUsersAdmin({ id, withDeleted }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.create` permission. + * Create a user */ export function createUserAdmin({ userAdminCreateDto }: { userAdminCreateDto: UserAdminCreateDto; @@ -1856,7 +1861,7 @@ export function createUserAdmin({ userAdminCreateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + * Delete a user */ export function deleteUserAdmin({ id, userAdminDeleteDto }: { id: string; @@ -1872,7 +1877,7 @@ export function deleteUserAdmin({ id, userAdminDeleteDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Retrieve a user */ export function getUserAdmin({ id }: { id: string; @@ -1885,7 +1890,7 @@ export function getUserAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.update` permission. + * Update a user */ export function updateUserAdmin({ id, userAdminUpdateDto }: { id: string; @@ -1901,7 +1906,7 @@ export function updateUserAdmin({ id, userAdminUpdateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Retrieve user preferences */ export function getUserPreferencesAdmin({ id }: { id: string; @@ -1914,7 +1919,7 @@ export function getUserPreferencesAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.update` permission. + * Update user preferences */ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { id: string; @@ -1930,7 +1935,7 @@ export function updateUserPreferencesAdmin({ id, userPreferencesUpdateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `adminUser.delete` permission. + * Restore a deleted user */ export function restoreUserAdmin({ id }: { id: string; @@ -1944,7 +1949,7 @@ export function restoreUserAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminSession.read` permission. + * Retrieve user sessions */ export function getUserSessionsAdmin({ id }: { id: string; @@ -1957,7 +1962,7 @@ export function getUserSessionsAdmin({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `adminUser.read` permission. + * Retrieve user statistics */ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility }: { id: string; @@ -1977,7 +1982,7 @@ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility } })); } /** - * This endpoint requires the `album.read` permission. + * List all albums */ export function getAllAlbums({ assetId, shared }: { assetId?: string; @@ -1994,7 +1999,7 @@ export function getAllAlbums({ assetId, shared }: { })); } /** - * This endpoint requires the `album.create` permission. + * Create an album */ export function createAlbum({ createAlbumDto }: { createAlbumDto: CreateAlbumDto; @@ -2009,7 +2014,7 @@ export function createAlbum({ createAlbumDto }: { }))); } /** - * This endpoint requires the `albumAsset.create` permission. + * Add assets to albums */ export function addAssetsToAlbums({ key, slug, albumsAddAssetsDto }: { key?: string; @@ -2029,7 +2034,7 @@ export function addAssetsToAlbums({ key, slug, albumsAddAssetsDto }: { }))); } /** - * This endpoint requires the `album.statistics` permission. + * Retrieve album statistics */ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2040,7 +2045,7 @@ export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `album.delete` permission. + * Delete an album */ export function deleteAlbum({ id }: { id: string; @@ -2051,7 +2056,7 @@ export function deleteAlbum({ id }: { })); } /** - * This endpoint requires the `album.read` permission. + * Retrieve an album */ export function getAlbumInfo({ id, key, slug, withoutAssets }: { id: string; @@ -2071,7 +2076,7 @@ export function getAlbumInfo({ id, key, slug, withoutAssets }: { })); } /** - * This endpoint requires the `album.update` permission. + * Update an album */ export function updateAlbumInfo({ id, updateAlbumDto }: { id: string; @@ -2087,7 +2092,7 @@ export function updateAlbumInfo({ id, updateAlbumDto }: { }))); } /** - * This endpoint requires the `albumAsset.delete` permission. + * Remove assets from an album */ export function removeAssetFromAlbum({ id, bulkIdsDto }: { id: string; @@ -2103,7 +2108,7 @@ export function removeAssetFromAlbum({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `albumAsset.create` permission. + * Add assets to an album */ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { id: string; @@ -2124,7 +2129,7 @@ export function addAssetsToAlbum({ id, key, slug, bulkIdsDto }: { }))); } /** - * This endpoint requires the `albumUser.delete` permission. + * Remove user from album */ export function removeUserFromAlbum({ id, userId }: { id: string; @@ -2136,7 +2141,7 @@ export function removeUserFromAlbum({ id, userId }: { })); } /** - * This endpoint requires the `albumUser.update` permission. + * Update user role */ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { id: string; @@ -2150,7 +2155,7 @@ export function updateAlbumUser({ id, userId, updateAlbumUserDto }: { }))); } /** - * This endpoint requires the `albumUser.create` permission. + * Share album with users */ export function addUsersToAlbum({ id, addUsersDto }: { id: string; @@ -2166,7 +2171,7 @@ export function addUsersToAlbum({ id, addUsersDto }: { }))); } /** - * This endpoint requires the `apiKey.read` permission. + * List all API keys */ export function getApiKeys(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2177,7 +2182,7 @@ export function getApiKeys(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `apiKey.create` permission. + * Create an API key */ export function createApiKey({ apiKeyCreateDto }: { apiKeyCreateDto: ApiKeyCreateDto; @@ -2191,6 +2196,9 @@ export function createApiKey({ apiKeyCreateDto }: { body: apiKeyCreateDto }))); } +/** + * Retrieve the current API key + */ export function getMyApiKey(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2200,7 +2208,7 @@ export function getMyApiKey(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `apiKey.delete` permission. + * Delete an API key */ export function deleteApiKey({ id }: { id: string; @@ -2211,7 +2219,7 @@ export function deleteApiKey({ id }: { })); } /** - * This endpoint requires the `apiKey.read` permission. + * Retrieve an API key */ export function getApiKey({ id }: { id: string; @@ -2224,7 +2232,7 @@ export function getApiKey({ id }: { })); } /** - * This endpoint requires the `apiKey.update` permission. + * Update an API key */ export function updateApiKey({ id, apiKeyUpdateDto }: { id: string; @@ -2240,7 +2248,7 @@ export function updateApiKey({ id, apiKeyUpdateDto }: { }))); } /** - * This endpoint requires the `asset.delete` permission. + * Delete assets */ export function deleteAssets({ assetBulkDeleteDto }: { assetBulkDeleteDto: AssetBulkDeleteDto; @@ -2252,7 +2260,7 @@ export function deleteAssets({ assetBulkDeleteDto }: { }))); } /** - * This endpoint requires the `asset.upload` permission. + * Upload asset */ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: { key?: string; @@ -2276,7 +2284,7 @@ export function uploadAsset({ key, slug, xImmichChecksum, assetMediaCreateDto }: }))); } /** - * This endpoint requires the `asset.update` permission. + * Update assets */ export function updateAssets({ assetBulkUpdateDto }: { assetBulkUpdateDto: AssetBulkUpdateDto; @@ -2288,7 +2296,7 @@ export function updateAssets({ assetBulkUpdateDto }: { }))); } /** - * checkBulkUpload + * Check bulk upload */ export function checkBulkUpload({ assetBulkUploadCheckDto }: { assetBulkUploadCheckDto: AssetBulkUploadCheckDto; @@ -2303,7 +2311,7 @@ export function checkBulkUpload({ assetBulkUploadCheckDto }: { }))); } /** - * This endpoint requires the `asset.copy` permission. + * Copy asset */ export function copyAsset({ assetCopyDto }: { assetCopyDto: AssetCopyDto; @@ -2315,7 +2323,7 @@ export function copyAsset({ assetCopyDto }: { }))); } /** - * getAllUserAssetsByDeviceId + * Retrieve assets by device ID */ export function getAllUserAssetsByDeviceId({ deviceId }: { deviceId: string; @@ -2328,7 +2336,7 @@ export function getAllUserAssetsByDeviceId({ deviceId }: { })); } /** - * checkExistingAssets + * Check existing assets */ export function checkExistingAssets({ checkExistingAssetsDto }: { checkExistingAssetsDto: CheckExistingAssetsDto; @@ -2342,6 +2350,9 @@ export function checkExistingAssets({ checkExistingAssetsDto }: { body: checkExistingAssetsDto }))); } +/** + * Run an asset job + */ export function runAssetJobs({ assetJobsDto }: { assetJobsDto: AssetJobsDto; }, opts?: Oazapfts.RequestOpts) { @@ -2352,7 +2363,7 @@ export function runAssetJobs({ assetJobsDto }: { }))); } /** - * This property was deprecated in v1.116.0. This endpoint requires the `asset.read` permission. + * Get random assets */ export function getRandom({ count }: { count?: number; @@ -2367,7 +2378,7 @@ export function getRandom({ count }: { })); } /** - * This endpoint requires the `asset.statistics` permission. + * Get asset statistics */ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { isFavorite?: boolean; @@ -2386,7 +2397,7 @@ export function getAssetStatistics({ isFavorite, isTrashed, visibility }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve an asset */ export function getAssetInfo({ id, key, slug }: { id: string; @@ -2404,7 +2415,7 @@ export function getAssetInfo({ id, key, slug }: { })); } /** - * This endpoint requires the `asset.update` permission. + * Update an asset */ export function updateAsset({ id, updateAssetDto }: { id: string; @@ -2420,7 +2431,7 @@ export function updateAsset({ id, updateAssetDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Get asset metadata */ export function getAssetMetadata({ id }: { id: string; @@ -2433,7 +2444,7 @@ export function getAssetMetadata({ id }: { })); } /** - * This endpoint requires the `asset.update` permission. + * Update asset metadata */ export function updateAssetMetadata({ id, assetMetadataUpsertDto }: { id: string; @@ -2449,7 +2460,7 @@ export function updateAssetMetadata({ id, assetMetadataUpsertDto }: { }))); } /** - * This endpoint requires the `asset.update` permission. + * Delete asset metadata by key */ export function deleteAssetMetadata({ id, key }: { id: string; @@ -2461,7 +2472,7 @@ export function deleteAssetMetadata({ id, key }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve asset metadata by key */ export function getAssetMetadataByKey({ id, key }: { id: string; @@ -2475,7 +2486,7 @@ export function getAssetMetadataByKey({ id, key }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve asset OCR data */ export function getAssetOcr({ id }: { id: string; @@ -2488,7 +2499,7 @@ export function getAssetOcr({ id }: { })); } /** - * This endpoint requires the `asset.download` permission. + * Download original asset */ export function downloadAsset({ id, key, slug }: { id: string; @@ -2506,7 +2517,7 @@ export function downloadAsset({ id, key, slug }: { })); } /** - * Replace the asset with new file, without changing its id + * Replace asset */ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { id: string; @@ -2527,7 +2538,7 @@ export function replaceAsset({ id, key, slug, assetMediaReplaceDto }: { }))); } /** - * This endpoint requires the `asset.view` permission. + * View asset thumbnail */ export function viewAsset({ id, key, size, slug }: { id: string; @@ -2547,7 +2558,7 @@ export function viewAsset({ id, key, size, slug }: { })); } /** - * This endpoint requires the `asset.view` permission. + * Play asset video */ export function playAssetVideo({ id, key, slug }: { id: string; @@ -2564,6 +2575,9 @@ export function playAssetVideo({ id, key, slug }: { ...opts })); } +/** + * Register admin + */ export function signUpAdmin({ signUpDto }: { signUpDto: SignUpDto; }, opts?: Oazapfts.RequestOpts) { @@ -2577,7 +2591,7 @@ export function signUpAdmin({ signUpDto }: { }))); } /** - * This endpoint requires the `auth.changePassword` permission. + * Change password */ export function changePassword({ changePasswordDto }: { changePasswordDto: ChangePasswordDto; @@ -2591,6 +2605,9 @@ export function changePassword({ changePasswordDto }: { body: changePasswordDto }))); } +/** + * Login + */ export function login({ loginCredentialDto }: { loginCredentialDto: LoginCredentialDto; }, opts?: Oazapfts.RequestOpts) { @@ -2603,6 +2620,9 @@ export function login({ loginCredentialDto }: { body: loginCredentialDto }))); } +/** + * Logout + */ export function logout(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2613,7 +2633,7 @@ export function logout(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `pinCode.delete` permission. + * Reset pin code */ export function resetPinCode({ pinCodeResetDto }: { pinCodeResetDto: PinCodeResetDto; @@ -2625,7 +2645,7 @@ export function resetPinCode({ pinCodeResetDto }: { }))); } /** - * This endpoint requires the `pinCode.create` permission. + * Setup pin code */ export function setupPinCode({ pinCodeSetupDto }: { pinCodeSetupDto: PinCodeSetupDto; @@ -2637,7 +2657,7 @@ export function setupPinCode({ pinCodeSetupDto }: { }))); } /** - * This endpoint requires the `pinCode.update` permission. + * Change pin code */ export function changePinCode({ pinCodeChangeDto }: { pinCodeChangeDto: PinCodeChangeDto; @@ -2648,12 +2668,18 @@ export function changePinCode({ pinCodeChangeDto }: { body: pinCodeChangeDto }))); } +/** + * Lock auth session + */ export function lockAuthSession(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/auth/session/lock", { ...opts, method: "POST" })); } +/** + * Unlock auth session + */ export function unlockAuthSession({ sessionUnlockDto }: { sessionUnlockDto: SessionUnlockDto; }, opts?: Oazapfts.RequestOpts) { @@ -2663,6 +2689,9 @@ export function unlockAuthSession({ sessionUnlockDto }: { body: sessionUnlockDto }))); } +/** + * Retrieve auth status + */ export function getAuthStatus(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2671,6 +2700,9 @@ export function getAuthStatus(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Validate access token + */ export function validateAccessToken(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -2681,7 +2713,7 @@ export function validateAccessToken(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.download` permission. + * Download asset archive */ export function downloadArchive({ key, slug, assetIdsDto }: { key?: string; @@ -2701,7 +2733,7 @@ export function downloadArchive({ key, slug, assetIdsDto }: { }))); } /** - * This endpoint requires the `asset.download` permission. + * Retrieve download information */ export function getDownloadInfo({ key, slug, downloadInfoDto }: { key?: string; @@ -2721,7 +2753,7 @@ export function getDownloadInfo({ key, slug, downloadInfoDto }: { }))); } /** - * This endpoint requires the `duplicate.delete` permission. + * Delete duplicates */ export function deleteDuplicates({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -2733,7 +2765,7 @@ export function deleteDuplicates({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `duplicate.read` permission. + * Retrieve duplicates */ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2744,7 +2776,7 @@ export function getAssetDuplicates(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `duplicate.delete` permission. + * Delete a duplicate */ export function deleteDuplicate({ id }: { id: string; @@ -2755,7 +2787,7 @@ export function deleteDuplicate({ id }: { })); } /** - * This endpoint requires the `face.read` permission. + * Retrieve faces for asset */ export function getFaces({ id }: { id: string; @@ -2770,7 +2802,7 @@ export function getFaces({ id }: { })); } /** - * This endpoint requires the `face.create` permission. + * Create a face */ export function createFace({ assetFaceCreateDto }: { assetFaceCreateDto: AssetFaceCreateDto; @@ -2782,7 +2814,7 @@ export function createFace({ assetFaceCreateDto }: { }))); } /** - * This endpoint requires the `face.delete` permission. + * Delete a face */ export function deleteFace({ id, assetFaceDeleteDto }: { id: string; @@ -2795,7 +2827,7 @@ export function deleteFace({ id, assetFaceDeleteDto }: { }))); } /** - * This endpoint requires the `face.update` permission. + * Re-assign a face to another person */ export function reassignFacesById({ id, faceDto }: { id: string; @@ -2811,7 +2843,7 @@ export function reassignFacesById({ id, faceDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `job.read` permission. + * Retrieve queue counts and status */ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2822,7 +2854,7 @@ export function getAllJobsStatus(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `job.create` permission. + * Create a manual job */ export function createJob({ jobCreateDto }: { jobCreateDto: JobCreateDto; @@ -2834,7 +2866,7 @@ export function createJob({ jobCreateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `job.create` permission. + * Run jobs */ export function sendJobCommand({ id, jobCommandDto }: { id: JobName; @@ -2850,7 +2882,7 @@ export function sendJobCommand({ id, jobCommandDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `library.read` permission. + * Retrieve libraries */ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -2861,7 +2893,7 @@ export function getAllLibraries(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `library.create` permission. + * Create a library */ export function createLibrary({ createLibraryDto }: { createLibraryDto: CreateLibraryDto; @@ -2876,7 +2908,7 @@ export function createLibrary({ createLibraryDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `library.delete` permission. + * Delete a library */ export function deleteLibrary({ id }: { id: string; @@ -2887,7 +2919,7 @@ export function deleteLibrary({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `library.read` permission. + * Retrieve a library */ export function getLibrary({ id }: { id: string; @@ -2900,7 +2932,7 @@ export function getLibrary({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `library.update` permission. + * Update a library */ export function updateLibrary({ id, updateLibraryDto }: { id: string; @@ -2916,7 +2948,7 @@ export function updateLibrary({ id, updateLibraryDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `library.update` permission. + * Scan a library */ export function scanLibrary({ id }: { id: string; @@ -2927,7 +2959,7 @@ export function scanLibrary({ id }: { })); } /** - * This endpoint is an admin-only route, and requires the `library.statistics` permission. + * Retrieve library statistics */ export function getLibraryStatistics({ id }: { id: string; @@ -2939,6 +2971,9 @@ export function getLibraryStatistics({ id }: { ...opts })); } +/** + * Validate library settings + */ export function validate({ id, validateLibraryDto }: { id: string; validateLibraryDto: ValidateLibraryDto; @@ -2952,11 +2987,14 @@ export function validate({ id, validateLibraryDto }: { body: validateLibraryDto }))); } -export function getMapMarkers({ isArchived, isFavorite, fileCreatedAfter, fileCreatedBefore, withPartners, withSharedAlbums }: { - isArchived?: boolean; - isFavorite?: boolean; +/** + * Retrieve map markers + */ +export function getMapMarkers({ fileCreatedAfter, fileCreatedBefore, isArchived, isFavorite, withPartners, withSharedAlbums }: { fileCreatedAfter?: string; fileCreatedBefore?: string; + isArchived?: boolean; + isFavorite?: boolean; withPartners?: boolean; withSharedAlbums?: boolean; }, opts?: Oazapfts.RequestOpts) { @@ -2964,16 +3002,19 @@ export function getMapMarkers({ isArchived, isFavorite, fileCreatedAfter, fileCr status: 200; data: MapMarkerResponseDto[]; }>(`/map/markers${QS.query(QS.explode({ - isArchived, - isFavorite, fileCreatedAfter, fileCreatedBefore, + isArchived, + isFavorite, withPartners, withSharedAlbums }))}`, { ...opts })); } +/** + * Reverse geocode coordinates + */ export function reverseGeocode({ lat, lon }: { lat: number; lon: number; @@ -2989,12 +3030,14 @@ export function reverseGeocode({ lat, lon }: { })); } /** - * This endpoint requires the `memory.read` permission. + * Retrieve memories */ -export function searchMemories({ $for, isSaved, isTrashed, $type }: { +export function searchMemories({ $for, isSaved, isTrashed, order, size, $type }: { $for?: string; isSaved?: boolean; isTrashed?: boolean; + order?: MemorySearchOrder; + size?: number; $type?: MemoryType; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3004,13 +3047,15 @@ export function searchMemories({ $for, isSaved, isTrashed, $type }: { "for": $for, isSaved, isTrashed, + order, + size, "type": $type }))}`, { ...opts })); } /** - * This endpoint requires the `memory.create` permission. + * Create a memory */ export function createMemory({ memoryCreateDto }: { memoryCreateDto: MemoryCreateDto; @@ -3025,12 +3070,14 @@ export function createMemory({ memoryCreateDto }: { }))); } /** - * This endpoint requires the `memory.statistics` permission. + * Retrieve memories statistics */ -export function memoriesStatistics({ $for, isSaved, isTrashed, $type }: { +export function memoriesStatistics({ $for, isSaved, isTrashed, order, size, $type }: { $for?: string; isSaved?: boolean; isTrashed?: boolean; + order?: MemorySearchOrder; + size?: number; $type?: MemoryType; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3040,13 +3087,15 @@ export function memoriesStatistics({ $for, isSaved, isTrashed, $type }: { "for": $for, isSaved, isTrashed, + order, + size, "type": $type }))}`, { ...opts })); } /** - * This endpoint requires the `memory.delete` permission. + * Delete a memory */ export function deleteMemory({ id }: { id: string; @@ -3057,7 +3106,7 @@ export function deleteMemory({ id }: { })); } /** - * This endpoint requires the `memory.read` permission. + * Retrieve a memory */ export function getMemory({ id }: { id: string; @@ -3070,7 +3119,7 @@ export function getMemory({ id }: { })); } /** - * This endpoint requires the `memory.update` permission. + * Update a memory */ export function updateMemory({ id, memoryUpdateDto }: { id: string; @@ -3086,7 +3135,7 @@ export function updateMemory({ id, memoryUpdateDto }: { }))); } /** - * This endpoint requires the `memoryAsset.delete` permission. + * Remove assets from a memory */ export function removeMemoryAssets({ id, bulkIdsDto }: { id: string; @@ -3102,7 +3151,7 @@ export function removeMemoryAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `memoryAsset.create` permission. + * Add assets to a memory */ export function addMemoryAssets({ id, bulkIdsDto }: { id: string; @@ -3118,7 +3167,7 @@ export function addMemoryAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `notification.delete` permission. + * Delete notifications */ export function deleteNotifications({ notificationDeleteAllDto }: { notificationDeleteAllDto: NotificationDeleteAllDto; @@ -3130,7 +3179,7 @@ export function deleteNotifications({ notificationDeleteAllDto }: { }))); } /** - * This endpoint requires the `notification.read` permission. + * Retrieve notifications */ export function getNotifications({ id, level, $type, unread }: { id?: string; @@ -3151,7 +3200,7 @@ export function getNotifications({ id, level, $type, unread }: { })); } /** - * This endpoint requires the `notification.update` permission. + * Update notifications */ export function updateNotifications({ notificationUpdateAllDto }: { notificationUpdateAllDto: NotificationUpdateAllDto; @@ -3163,7 +3212,7 @@ export function updateNotifications({ notificationUpdateAllDto }: { }))); } /** - * This endpoint requires the `notification.delete` permission. + * Delete a notification */ export function deleteNotification({ id }: { id: string; @@ -3174,7 +3223,7 @@ export function deleteNotification({ id }: { })); } /** - * This endpoint requires the `notification.read` permission. + * Get a notification */ export function getNotification({ id }: { id: string; @@ -3187,7 +3236,7 @@ export function getNotification({ id }: { })); } /** - * This endpoint requires the `notification.update` permission. + * Update a notification */ export function updateNotification({ id, notificationUpdateDto }: { id: string; @@ -3202,6 +3251,9 @@ export function updateNotification({ id, notificationUpdateDto }: { body: notificationUpdateDto }))); } +/** + * Start OAuth + */ export function startOAuth({ oAuthConfigDto }: { oAuthConfigDto: OAuthConfigDto; }, opts?: Oazapfts.RequestOpts) { @@ -3214,6 +3266,9 @@ export function startOAuth({ oAuthConfigDto }: { body: oAuthConfigDto }))); } +/** + * Finish OAuth + */ export function finishOAuth({ oAuthCallbackDto }: { oAuthCallbackDto: OAuthCallbackDto; }, opts?: Oazapfts.RequestOpts) { @@ -3226,6 +3281,9 @@ export function finishOAuth({ oAuthCallbackDto }: { body: oAuthCallbackDto }))); } +/** + * Link OAuth account + */ export function linkOAuthAccount({ oAuthCallbackDto }: { oAuthCallbackDto: OAuthCallbackDto; }, opts?: Oazapfts.RequestOpts) { @@ -3238,11 +3296,17 @@ export function linkOAuthAccount({ oAuthCallbackDto }: { body: oAuthCallbackDto }))); } +/** + * Redirect OAuth to mobile + */ export function redirectOAuthToMobile(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/oauth/mobile-redirect", { ...opts })); } +/** + * Unlink OAuth account + */ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3253,7 +3317,7 @@ export function unlinkOAuthAccount(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `partner.read` permission. + * Retrieve partners */ export function getPartners({ direction }: { direction: PartnerDirection; @@ -3268,7 +3332,7 @@ export function getPartners({ direction }: { })); } /** - * This endpoint requires the `partner.create` permission. + * Create a partner */ export function createPartner({ partnerCreateDto }: { partnerCreateDto: PartnerCreateDto; @@ -3283,7 +3347,7 @@ export function createPartner({ partnerCreateDto }: { }))); } /** - * This endpoint requires the `partner.delete` permission. + * Remove a partner */ export function removePartner({ id }: { id: string; @@ -3294,7 +3358,7 @@ export function removePartner({ id }: { })); } /** - * This property was deprecated in v1.141.0. This endpoint requires the `partner.create` permission. + * Create a partner */ export function createPartnerDeprecated({ id }: { id: string; @@ -3308,7 +3372,7 @@ export function createPartnerDeprecated({ id }: { })); } /** - * This endpoint requires the `partner.update` permission. + * Update a partner */ export function updatePartner({ id, partnerUpdateDto }: { id: string; @@ -3324,7 +3388,7 @@ export function updatePartner({ id, partnerUpdateDto }: { }))); } /** - * This endpoint requires the `person.delete` permission. + * Delete people */ export function deletePeople({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -3336,7 +3400,7 @@ export function deletePeople({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `person.read` permission. + * Get all people */ export function getAllPeople({ closestAssetId, closestPersonId, page, size, withHidden }: { closestAssetId?: string; @@ -3359,7 +3423,7 @@ export function getAllPeople({ closestAssetId, closestPersonId, page, size, with })); } /** - * This endpoint requires the `person.create` permission. + * Create a person */ export function createPerson({ personCreateDto }: { personCreateDto: PersonCreateDto; @@ -3374,7 +3438,7 @@ export function createPerson({ personCreateDto }: { }))); } /** - * This endpoint requires the `person.update` permission. + * Update people */ export function updatePeople({ peopleUpdateDto }: { peopleUpdateDto: PeopleUpdateDto; @@ -3389,7 +3453,7 @@ export function updatePeople({ peopleUpdateDto }: { }))); } /** - * This endpoint requires the `person.delete` permission. + * Delete person */ export function deletePerson({ id }: { id: string; @@ -3400,7 +3464,7 @@ export function deletePerson({ id }: { })); } /** - * This endpoint requires the `person.read` permission. + * Get a person */ export function getPerson({ id }: { id: string; @@ -3413,7 +3477,7 @@ export function getPerson({ id }: { })); } /** - * This endpoint requires the `person.update` permission. + * Update person */ export function updatePerson({ id, personUpdateDto }: { id: string; @@ -3429,7 +3493,7 @@ export function updatePerson({ id, personUpdateDto }: { }))); } /** - * This endpoint requires the `person.merge` permission. + * Merge people */ export function mergePerson({ id, mergePersonDto }: { id: string; @@ -3445,7 +3509,7 @@ export function mergePerson({ id, mergePersonDto }: { }))); } /** - * This endpoint requires the `person.reassign` permission. + * Reassign faces */ export function reassignFaces({ id, assetFaceUpdateDto }: { id: string; @@ -3461,7 +3525,7 @@ export function reassignFaces({ id, assetFaceUpdateDto }: { }))); } /** - * This endpoint requires the `person.statistics` permission. + * Get person statistics */ export function getPersonStatistics({ id }: { id: string; @@ -3474,7 +3538,7 @@ export function getPersonStatistics({ id }: { })); } /** - * This endpoint requires the `person.read` permission. + * Get person thumbnail */ export function getPersonThumbnail({ id }: { id: string; @@ -3487,7 +3551,7 @@ export function getPersonThumbnail({ id }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve assets by city */ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3498,7 +3562,7 @@ export function getAssetsByCity(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve explore data */ export function getExploreData(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3509,7 +3573,7 @@ export function getExploreData(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.read` permission. + * Search large assets */ export function searchLargeAssets({ albumIds, city, country, createdAfter, createdBefore, deviceId, isEncoded, isFavorite, isMotion, isNotInAlbum, isOffline, lensModel, libraryId, make, minFileSize, model, ocr, personIds, rating, size, state, tagIds, takenAfter, takenBefore, trashedAfter, trashedBefore, $type, updatedAfter, updatedBefore, visibility, withDeleted, withExif }: { albumIds?: string[]; @@ -3587,7 +3651,7 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat })); } /** - * This endpoint requires the `asset.read` permission. + * Search assets by metadata */ export function searchAssets({ metadataSearchDto }: { metadataSearchDto: MetadataSearchDto; @@ -3602,7 +3666,7 @@ export function searchAssets({ metadataSearchDto }: { }))); } /** - * This endpoint requires the `person.read` permission. + * Search people */ export function searchPerson({ name, withHidden }: { name: string; @@ -3619,7 +3683,7 @@ export function searchPerson({ name, withHidden }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Search places */ export function searchPlaces({ name }: { name: string; @@ -3634,7 +3698,7 @@ export function searchPlaces({ name }: { })); } /** - * This endpoint requires the `asset.read` permission. + * Search random assets */ export function searchRandom({ randomSearchDto }: { randomSearchDto: RandomSearchDto; @@ -3649,7 +3713,7 @@ export function searchRandom({ randomSearchDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Smart asset search */ export function searchSmart({ smartSearchDto }: { smartSearchDto: SmartSearchDto; @@ -3664,7 +3728,7 @@ export function searchSmart({ smartSearchDto }: { }))); } /** - * This endpoint requires the `asset.statistics` permission. + * Search asset statistics */ export function searchAssetStatistics({ statisticsSearchDto }: { statisticsSearchDto: StatisticsSearchDto; @@ -3679,7 +3743,7 @@ export function searchAssetStatistics({ statisticsSearchDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Retrieve search suggestions */ export function getSearchSuggestions({ country, includeNull, lensModel, make, model, state, $type }: { country?: string; @@ -3706,7 +3770,7 @@ export function getSearchSuggestions({ country, includeNull, lensModel, make, mo })); } /** - * This endpoint requires the `server.about` permission. + * Get server information */ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3717,7 +3781,7 @@ export function getAboutInfo(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `server.apkLinks` permission. + * Get APK links */ export function getApkLinks(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3727,6 +3791,9 @@ export function getApkLinks(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get config + */ export function getServerConfig(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3735,6 +3802,9 @@ export function getServerConfig(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get features + */ export function getServerFeatures(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3744,7 +3814,7 @@ export function getServerFeatures(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `serverLicense.delete` permission. + * Delete server product key */ export function deleteServerLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/server/license", { @@ -3753,7 +3823,7 @@ export function deleteServerLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `serverLicense.read` permission. + * Get product key */ export function getServerLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3766,7 +3836,7 @@ export function getServerLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `serverLicense.update` permission. + * Set server product key */ export function setServerLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; @@ -3780,6 +3850,9 @@ export function setServerLicense({ licenseKeyDto }: { body: licenseKeyDto }))); } +/** + * Get supported media types + */ export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3788,6 +3861,9 @@ export function getSupportedMediaTypes(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Ping + */ export function pingServer(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3797,7 +3873,7 @@ export function pingServer(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `server.statistics` permission. + * Get statistics */ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3808,7 +3884,7 @@ export function getServerStatistics(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `server.storage` permission. + * Get storage */ export function getStorage(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3818,6 +3894,9 @@ export function getStorage(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get theme + */ export function getTheme(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3826,6 +3905,9 @@ export function getTheme(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get server version + */ export function getServerVersion(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3835,7 +3917,7 @@ export function getServerVersion(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `server.versionCheck` permission. + * Get version check status */ export function getVersionCheck(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3845,6 +3927,9 @@ export function getVersionCheck(opts?: Oazapfts.RequestOpts) { ...opts })); } +/** + * Get version history + */ export function getVersionHistory(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -3854,7 +3939,7 @@ export function getVersionHistory(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `session.delete` permission. + * Delete all sessions */ export function deleteAllSessions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/sessions", { @@ -3863,7 +3948,7 @@ export function deleteAllSessions(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `session.read` permission. + * Retrieve sessions */ export function getSessions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -3874,7 +3959,7 @@ export function getSessions(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `session.create` permission. + * Create a session */ export function createSession({ sessionCreateDto }: { sessionCreateDto: SessionCreateDto; @@ -3889,7 +3974,7 @@ export function createSession({ sessionCreateDto }: { }))); } /** - * This endpoint requires the `session.delete` permission. + * Delete a session */ export function deleteSession({ id }: { id: string; @@ -3900,7 +3985,7 @@ export function deleteSession({ id }: { })); } /** - * This endpoint requires the `session.update` permission. + * Update a session */ export function updateSession({ id, sessionUpdateDto }: { id: string; @@ -3916,7 +4001,7 @@ export function updateSession({ id, sessionUpdateDto }: { }))); } /** - * This endpoint requires the `session.lock` permission. + * Lock a session */ export function lockSession({ id }: { id: string; @@ -3927,7 +4012,7 @@ export function lockSession({ id }: { })); } /** - * This endpoint requires the `sharedLink.read` permission. + * Retrieve all shared links */ export function getAllSharedLinks({ albumId }: { albumId?: string; @@ -3942,7 +4027,7 @@ export function getAllSharedLinks({ albumId }: { })); } /** - * This endpoint requires the `sharedLink.create` permission. + * Create a shared link */ export function createSharedLink({ sharedLinkCreateDto }: { sharedLinkCreateDto: SharedLinkCreateDto; @@ -3956,26 +4041,29 @@ export function createSharedLink({ sharedLinkCreateDto }: { body: sharedLinkCreateDto }))); } -export function getMySharedLink({ password, token, key, slug }: { - password?: string; - token?: string; +/** + * Retrieve current shared link + */ +export function getMySharedLink({ key, password, slug, token }: { key?: string; + password?: string; slug?: string; + token?: string; }, opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; data: SharedLinkResponseDto; }>(`/shared-links/me${QS.query(QS.explode({ - password, - token, key, - slug + password, + slug, + token }))}`, { ...opts })); } /** - * This endpoint requires the `sharedLink.delete` permission. + * Delete a shared link */ export function removeSharedLink({ id }: { id: string; @@ -3986,7 +4074,7 @@ export function removeSharedLink({ id }: { })); } /** - * This endpoint requires the `sharedLink.read` permission. + * Retrieve a shared link */ export function getSharedLinkById({ id }: { id: string; @@ -3999,7 +4087,7 @@ export function getSharedLinkById({ id }: { })); } /** - * This endpoint requires the `sharedLink.update` permission. + * Update a shared link */ export function updateSharedLink({ id, sharedLinkEditDto }: { id: string; @@ -4014,6 +4102,9 @@ export function updateSharedLink({ id, sharedLinkEditDto }: { body: sharedLinkEditDto }))); } +/** + * Remove assets from a shared link + */ export function removeSharedLinkAssets({ id, key, slug, assetIdsDto }: { id: string; key?: string; @@ -4032,6 +4123,9 @@ export function removeSharedLinkAssets({ id, key, slug, assetIdsDto }: { body: assetIdsDto }))); } +/** + * Add assets to a shared link + */ export function addSharedLinkAssets({ id, key, slug, assetIdsDto }: { id: string; key?: string; @@ -4051,7 +4145,7 @@ export function addSharedLinkAssets({ id, key, slug, assetIdsDto }: { }))); } /** - * This endpoint requires the `stack.delete` permission. + * Delete stacks */ export function deleteStacks({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -4063,7 +4157,7 @@ export function deleteStacks({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `stack.read` permission. + * Retrieve stacks */ export function searchStacks({ primaryAssetId }: { primaryAssetId?: string; @@ -4078,7 +4172,7 @@ export function searchStacks({ primaryAssetId }: { })); } /** - * This endpoint requires the `stack.create` permission. + * Create a stack */ export function createStack({ stackCreateDto }: { stackCreateDto: StackCreateDto; @@ -4093,7 +4187,7 @@ export function createStack({ stackCreateDto }: { }))); } /** - * This endpoint requires the `stack.delete` permission. + * Delete a stack */ export function deleteStack({ id }: { id: string; @@ -4104,7 +4198,7 @@ export function deleteStack({ id }: { })); } /** - * This endpoint requires the `stack.read` permission. + * Retrieve a stack */ export function getStack({ id }: { id: string; @@ -4117,7 +4211,7 @@ export function getStack({ id }: { })); } /** - * This endpoint requires the `stack.update` permission. + * Update a stack */ export function updateStack({ id, stackUpdateDto }: { id: string; @@ -4133,7 +4227,7 @@ export function updateStack({ id, stackUpdateDto }: { }))); } /** - * This endpoint requires the `stack.update` permission. + * Remove an asset from a stack */ export function removeAssetFromStack({ assetId, id }: { assetId: string; @@ -4145,7 +4239,7 @@ export function removeAssetFromStack({ assetId, id }: { })); } /** - * This endpoint requires the `syncCheckpoint.delete` permission. + * Delete acknowledgements */ export function deleteSyncAck({ syncAckDeleteDto }: { syncAckDeleteDto: SyncAckDeleteDto; @@ -4157,7 +4251,7 @@ export function deleteSyncAck({ syncAckDeleteDto }: { }))); } /** - * This endpoint requires the `syncCheckpoint.read` permission. + * Retrieve acknowledgements */ export function getSyncAck(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4168,7 +4262,7 @@ export function getSyncAck(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `syncCheckpoint.update` permission. + * Acknowledge changes */ export function sendSyncAck({ syncAckSetDto }: { syncAckSetDto: SyncAckSetDto; @@ -4179,6 +4273,9 @@ export function sendSyncAck({ syncAckSetDto }: { body: syncAckSetDto }))); } +/** + * Get delta sync for user + */ export function getDeltaSync({ assetDeltaSyncDto }: { assetDeltaSyncDto: AssetDeltaSyncDto; }, opts?: Oazapfts.RequestOpts) { @@ -4191,6 +4288,9 @@ export function getDeltaSync({ assetDeltaSyncDto }: { body: assetDeltaSyncDto }))); } +/** + * Get full sync for user + */ export function getFullSyncForUser({ assetFullSyncDto }: { assetFullSyncDto: AssetFullSyncDto; }, opts?: Oazapfts.RequestOpts) { @@ -4204,7 +4304,7 @@ export function getFullSyncForUser({ assetFullSyncDto }: { }))); } /** - * This endpoint requires the `sync.stream` permission. + * Stream sync changes */ export function getSyncStream({ syncStreamDto }: { syncStreamDto: SyncStreamDto; @@ -4216,7 +4316,7 @@ export function getSyncStream({ syncStreamDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + * Get system configuration */ export function getConfig(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4227,7 +4327,7 @@ export function getConfig(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.update` permission. + * Update system configuration */ export function updateConfig({ systemConfigDto }: { systemConfigDto: SystemConfigDto; @@ -4242,7 +4342,7 @@ export function updateConfig({ systemConfigDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + * Get system configuration defaults */ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4253,7 +4353,7 @@ export function getConfigDefaults(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemConfig.read` permission. + * Get storage template options */ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4264,7 +4364,7 @@ export function getStorageTemplateOptions(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + * Retrieve admin onboarding */ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4275,7 +4375,7 @@ export function getAdminOnboarding(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.update` permission. + * Update admin onboarding */ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { adminOnboardingUpdateDto: AdminOnboardingUpdateDto; @@ -4287,7 +4387,7 @@ export function updateAdminOnboarding({ adminOnboardingUpdateDto }: { }))); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + * Retrieve reverse geocoding state */ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4298,7 +4398,7 @@ export function getReverseGeocodingState(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint is an admin-only route, and requires the `systemMetadata.read` permission. + * Retrieve version check state */ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4309,7 +4409,7 @@ export function getVersionCheckState(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `tag.read` permission. + * Retrieve tags */ export function getAllTags(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4320,7 +4420,7 @@ export function getAllTags(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `tag.create` permission. + * Create a tag */ export function createTag({ tagCreateDto }: { tagCreateDto: TagCreateDto; @@ -4335,7 +4435,7 @@ export function createTag({ tagCreateDto }: { }))); } /** - * This endpoint requires the `tag.create` permission. + * Upsert tags */ export function upsertTags({ tagUpsertDto }: { tagUpsertDto: TagUpsertDto; @@ -4350,7 +4450,7 @@ export function upsertTags({ tagUpsertDto }: { }))); } /** - * This endpoint requires the `tag.asset` permission. + * Tag assets */ export function bulkTagAssets({ tagBulkAssetsDto }: { tagBulkAssetsDto: TagBulkAssetsDto; @@ -4365,7 +4465,7 @@ export function bulkTagAssets({ tagBulkAssetsDto }: { }))); } /** - * This endpoint requires the `tag.delete` permission. + * Delete a tag */ export function deleteTag({ id }: { id: string; @@ -4376,7 +4476,7 @@ export function deleteTag({ id }: { })); } /** - * This endpoint requires the `tag.read` permission. + * Retrieve a tag */ export function getTagById({ id }: { id: string; @@ -4389,7 +4489,7 @@ export function getTagById({ id }: { })); } /** - * This endpoint requires the `tag.update` permission. + * Update a tag */ export function updateTag({ id, tagUpdateDto }: { id: string; @@ -4405,7 +4505,7 @@ export function updateTag({ id, tagUpdateDto }: { }))); } /** - * This endpoint requires the `tag.asset` permission. + * Untag assets */ export function untagAssets({ id, bulkIdsDto }: { id: string; @@ -4421,7 +4521,7 @@ export function untagAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `tag.asset` permission. + * Tag assets */ export function tagAssets({ id, bulkIdsDto }: { id: string; @@ -4437,7 +4537,7 @@ export function tagAssets({ id, bulkIdsDto }: { }))); } /** - * This endpoint requires the `asset.read` permission. + * Get time bucket */ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, timeBucket, userId, visibility, withCoordinates, withPartners, withStacked }: { albumId?: string; @@ -4478,7 +4578,7 @@ export function getTimeBucket({ albumId, isFavorite, isTrashed, key, order, pers })); } /** - * This endpoint requires the `asset.read` permission. + * Get time buckets */ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, personId, slug, tagId, userId, visibility, withCoordinates, withPartners, withStacked }: { albumId?: string; @@ -4517,7 +4617,7 @@ export function getTimeBuckets({ albumId, isFavorite, isTrashed, key, order, per })); } /** - * This endpoint requires the `asset.delete` permission. + * Empty trash */ export function emptyTrash(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4529,7 +4629,7 @@ export function emptyTrash(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.delete` permission. + * Restore trash */ export function restoreTrash(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4541,7 +4641,7 @@ export function restoreTrash(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `asset.delete` permission. + * Restore assets */ export function restoreAssets({ bulkIdsDto }: { bulkIdsDto: BulkIdsDto; @@ -4556,7 +4656,7 @@ export function restoreAssets({ bulkIdsDto }: { }))); } /** - * This endpoint requires the `user.read` permission. + * Get all users */ export function searchUsers(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4567,7 +4667,7 @@ export function searchUsers(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `user.read` permission. + * Get current user */ export function getMyUser(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4578,7 +4678,7 @@ export function getMyUser(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `user.update` permission. + * Update current user */ export function updateMyUser({ userUpdateMeDto }: { userUpdateMeDto: UserUpdateMeDto; @@ -4593,7 +4693,7 @@ export function updateMyUser({ userUpdateMeDto }: { }))); } /** - * This endpoint requires the `userLicense.delete` permission. + * Delete user product key */ export function deleteUserLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/me/license", { @@ -4602,7 +4702,7 @@ export function deleteUserLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userLicense.read` permission. + * Retrieve user product key */ export function getUserLicense(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4613,7 +4713,7 @@ export function getUserLicense(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userLicense.update` permission. + * Set user product key */ export function setUserLicense({ licenseKeyDto }: { licenseKeyDto: LicenseKeyDto; @@ -4628,7 +4728,7 @@ export function setUserLicense({ licenseKeyDto }: { }))); } /** - * This endpoint requires the `userOnboarding.delete` permission. + * Delete user onboarding */ export function deleteUserOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/me/onboarding", { @@ -4637,7 +4737,7 @@ export function deleteUserOnboarding(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userOnboarding.read` permission. + * Retrieve user onboarding */ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4648,7 +4748,7 @@ export function getUserOnboarding(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userOnboarding.update` permission. + * Update user onboarding */ export function setUserOnboarding({ onboardingDto }: { onboardingDto: OnboardingDto; @@ -4663,7 +4763,7 @@ export function setUserOnboarding({ onboardingDto }: { }))); } /** - * This endpoint requires the `userPreference.read` permission. + * Get my preferences */ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ @@ -4674,7 +4774,7 @@ export function getMyPreferences(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userPreference.update` permission. + * Update my preferences */ export function updateMyPreferences({ userPreferencesUpdateDto }: { userPreferencesUpdateDto: UserPreferencesUpdateDto; @@ -4689,7 +4789,7 @@ export function updateMyPreferences({ userPreferencesUpdateDto }: { }))); } /** - * This endpoint requires the `userProfileImage.delete` permission. + * Delete user profile image */ export function deleteProfileImage(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchText("/users/profile-image", { @@ -4698,7 +4798,7 @@ export function deleteProfileImage(opts?: Oazapfts.RequestOpts) { })); } /** - * This endpoint requires the `userProfileImage.update` permission. + * Create user profile image */ export function createProfileImage({ createProfileImageDto }: { createProfileImageDto: CreateProfileImageDto; @@ -4713,7 +4813,7 @@ export function createProfileImage({ createProfileImageDto }: { }))); } /** - * This endpoint requires the `user.read` permission. + * Retrieve a user */ export function getUser({ id }: { id: string; @@ -4726,7 +4826,7 @@ export function getUser({ id }: { })); } /** - * This endpoint requires the `userProfileImage.read` permission. + * Retrieve user profile image */ export function getProfileImage({ id }: { id: string; @@ -4738,6 +4838,9 @@ export function getProfileImage({ id }: { ...opts })); } +/** + * Retrieve assets by original path + */ export function getAssetsByOriginalPath({ path }: { path: string; }, opts?: Oazapfts.RequestOpts) { @@ -4750,6 +4853,9 @@ export function getAssetsByOriginalPath({ path }: { ...opts })); } +/** + * Retrieve unique paths + */ export function getUniqueOriginalPaths(opts?: Oazapfts.RequestOpts) { return oazapfts.ok(oazapfts.fetchJson<{ status: 200; @@ -5027,6 +5133,11 @@ export enum JobCommand { Empty = "empty", ClearFailed = "clear-failed" } +export enum MemorySearchOrder { + Asc = "asc", + Desc = "desc", + Random = "random" +} export enum MemoryType { OnThisDay = "on_this_day" } diff --git a/package.json b/package.json index 4c262de2b9..d08ea46edf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Monorepo for Immich", "private": true, - "packageManager": "pnpm@10.19.0+sha512.c9fc7236e92adf5c8af42fd5bf1612df99c2ceb62f27047032f4720b33f8eacdde311865e91c411f2774f618d82f320808ecb51718bfa82c060c4ba7c76a32b8", + "packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd", "engines": { "pnpm": ">=10.0.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3bfa010f5..e6293e81d9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,11 +63,11 @@ importers: specifier: ^4.13.1 version: 4.13.4 '@types/node': - specifier: ^22.18.12 - version: 22.18.13 + specifier: ^22.19.0 + version: 22.19.0 '@vitest/coverage-v8': specifier: ^3.0.0 - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) byte-size: specifier: ^9.0.0 version: 9.0.1 @@ -109,16 +109,16 @@ importers: version: 8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3) vite: specifier: ^7.0.0 - version: 7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + version: 7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) vite-tsconfig-paths: specifier: ^5.0.0 - version: 5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) vitest: specifier: ^3.0.0 - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) vitest-fetch-mock: specifier: ^0.4.0 - version: 0.4.5(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 0.4.5(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) yaml: specifier: ^2.3.1 version: 2.8.1 @@ -211,14 +211,14 @@ importers: specifier: ^3.4.2 version: 3.7.1 '@types/node': - specifier: ^22.18.12 - version: 22.18.13 + specifier: ^22.19.0 + version: 22.19.0 '@types/oidc-provider': specifier: ^9.0.0 version: 9.5.0 '@types/pg': specifier: ^8.15.1 - version: 8.15.5 + version: 8.15.6 '@types/pngjs': specifier: ^6.0.4 version: 6.0.5 @@ -239,7 +239,7 @@ importers: version: 60.0.0(eslint@9.38.0(jiti@2.6.1)) exiftool-vendored: specifier: ^31.1.0 - version: 31.1.0 + version: 31.3.0 globals: specifier: ^16.0.0 version: 16.4.0 @@ -284,7 +284,7 @@ importers: version: 5.2.1(encoding@0.1.13) vitest: specifier: ^3.0.0 - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2(encoding@0.1.13)))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2(encoding@0.1.13)))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) open-api/typescript-sdk: dependencies: @@ -293,8 +293,8 @@ importers: version: 1.0.4 devDependencies: '@types/node': - specifier: ^22.18.12 - version: 22.18.13 + specifier: ^22.19.0 + version: 22.19.0 typescript: specifier: ^5.3.3 version: 5.9.3 @@ -303,28 +303,28 @@ importers: dependencies: '@nestjs/bullmq': specifier: ^11.0.1 - version: 11.0.4(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(bullmq@5.61.2) + version: 11.0.4(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(bullmq@5.62.1) '@nestjs/common': specifier: ^11.0.4 - version: 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/core': specifier: ^11.0.4 - version: 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nestjs/platform-express': specifier: ^11.0.4 - version: 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) + version: 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) '@nestjs/platform-socket.io': specifier: ^11.0.4 - version: 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.7)(rxjs@7.8.2) + version: 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.8)(rxjs@7.8.2) '@nestjs/schedule': specifier: ^6.0.0 - version: 6.0.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) + version: 6.0.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) '@nestjs/swagger': specifier: ^11.0.2 - version: 11.2.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2) + version: 11.2.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2) '@nestjs/websockets': specifier: ^11.0.4 - version: 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@nestjs/platform-socket.io@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@nestjs/platform-socket.io@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': specifier: ^1.9.0 version: 1.9.0 @@ -381,7 +381,7 @@ importers: version: 2.2.0 bullmq: specifier: ^5.51.0 - version: 5.61.2 + version: 5.62.1 chokidar: specifier: ^4.0.3 version: 4.0.3 @@ -405,7 +405,7 @@ importers: version: 4.3.3 exiftool-vendored: specifier: ^31.1.0 - version: 31.1.0 + version: 31.3.0 express: specifier: ^5.1.0 version: 5.1.0 @@ -453,16 +453,16 @@ importers: version: 2.0.2 nest-commander: specifier: ^3.16.0 - version: 3.20.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@types/inquirer@8.2.11)(@types/node@22.18.13)(typescript@5.9.3) + version: 3.20.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@types/inquirer@8.2.11)(@types/node@22.19.0)(typescript@5.9.3) nestjs-cls: specifier: ^5.0.0 - version: 5.4.3(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + version: 5.4.3(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) nestjs-kysely: specifier: 3.1.2 - version: 3.1.2(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(kysely@0.28.2)(reflect-metadata@0.2.2) + version: 3.1.2(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(kysely@0.28.2)(reflect-metadata@0.2.2) nestjs-otel: specifier: ^7.0.0 - version: 7.0.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) + version: 7.0.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) nodemailer: specifier: ^7.0.0 version: 7.0.10 @@ -489,7 +489,7 @@ importers: version: 19.2.0(react@19.2.0) react-email: specifier: ^4.0.0 - version: 4.3.1 + version: 4.3.2 reflect-metadata: specifier: ^0.2.0 version: 0.2.2 @@ -535,16 +535,16 @@ importers: version: 9.38.0 '@nestjs/cli': specifier: ^11.0.2 - version: 11.0.10(@swc/core@1.13.5(@swc/helpers@0.5.17))(@types/node@22.18.13) + version: 11.0.10(@swc/core@1.14.0(@swc/helpers@0.5.17))(@types/node@22.19.0) '@nestjs/schematics': specifier: ^11.0.0 version: 11.0.9(chokidar@4.0.3)(typescript@5.9.3) '@nestjs/testing': specifier: ^11.0.4 - version: 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@nestjs/platform-express@11.1.7) + version: 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@nestjs/platform-express@11.1.8) '@swc/core': specifier: ^1.4.14 - version: 1.13.5(@swc/helpers@0.5.17) + version: 1.14.0(@swc/helpers@0.5.17) '@types/archiver': specifier: ^6.0.0 version: 6.0.4 @@ -585,8 +585,8 @@ importers: specifier: ^2.0.0 version: 2.0.0 '@types/node': - specifier: ^22.18.12 - version: 22.18.13 + specifier: ^22.19.0 + version: 22.19.0 '@types/nodemailer': specifier: ^7.0.0 version: 7.0.3 @@ -613,22 +613,22 @@ importers: version: 0.7.39 '@types/validator': specifier: ^13.15.2 - version: 13.15.3 + version: 13.15.4 '@vitest/coverage-v8': specifier: ^3.0.0 - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@1.21.7)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) eslint: specifier: ^9.14.0 - version: 9.38.0(jiti@1.21.7) + version: 9.38.0(jiti@2.6.1) eslint-config-prettier: specifier: ^10.1.8 - version: 10.1.8(eslint@9.38.0(jiti@1.21.7)) + version: 10.1.8(eslint@9.38.0(jiti@2.6.1)) eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@1.21.7)))(eslint@9.38.0(jiti@1.21.7))(prettier@3.6.2) + version: 5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@2.6.1)))(eslint@9.38.0(jiti@2.6.1))(prettier@3.6.2) eslint-plugin-unicorn: specifier: ^60.0.0 - version: 60.0.0(eslint@9.38.0(jiti@1.21.7)) + version: 60.0.0(eslint@9.38.0(jiti@2.6.1)) globals: specifier: ^16.0.0 version: 16.4.0 @@ -664,16 +664,16 @@ importers: version: 5.9.3 typescript-eslint: specifier: ^8.28.0 - version: 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) + version: 8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3) unplugin-swc: specifier: ^1.4.5 - version: 1.5.8(@swc/core@1.13.5(@swc/helpers@0.5.17))(rollup@4.52.5) + version: 1.5.8(@swc/core@1.14.0(@swc/helpers@0.5.17))(rollup@4.52.5) vite-tsconfig-paths: specifier: ^5.0.0 - version: 5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) vitest: specifier: ^3.0.0 - version: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@1.21.7)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) web: dependencies: @@ -687,8 +687,8 @@ importers: specifier: file:../open-api/typescript-sdk version: link:../open-api/typescript-sdk '@immich/ui': - specifier: ^0.40.2 - version: 0.40.2(@internationalized/date@3.8.2)(svelte@5.41.3) + specifier: ^0.43.0 + version: 0.43.0(@internationalized/date@3.8.2)(svelte@5.43.0) '@mapbox/mapbox-gl-rtl-text': specifier: 0.2.3 version: 0.2.3(mapbox-gl@1.13.3) @@ -718,7 +718,7 @@ importers: version: 0.41.3 '@zoom-image/svelte': specifier: ^0.3.0 - version: 0.3.7(svelte@5.41.3) + version: 0.3.7(svelte@5.43.0) async-mutex: specifier: ^0.5.0 version: 0.5.0 @@ -739,7 +739,7 @@ importers: version: 4.7.8 happy-dom: specifier: ^20.0.0 - version: 20.0.8 + version: 20.0.10 intl-messageformat: specifier: ^10.7.11 version: 10.7.18 @@ -754,7 +754,7 @@ importers: version: 3.7.2 maplibre-gl: specifier: ^5.6.2 - version: 5.9.0 + version: 5.10.0 pmtiles: specifier: ^4.3.0 version: 4.3.0 @@ -763,7 +763,7 @@ importers: version: 1.5.4 simple-icons: specifier: ^15.15.0 - version: 15.17.0 + version: 15.18.0 socket.io-client: specifier: ~4.8.0 version: 4.8.1 @@ -772,13 +772,13 @@ importers: version: 5.2.2 svelte-i18n: specifier: ^4.0.1 - version: 4.0.1(svelte@5.41.3) + version: 4.0.1(svelte@5.43.0) svelte-maplibre: - specifier: ^1.2.0 - version: 1.2.3(svelte@5.41.3) + specifier: ^1.2.5 + version: 1.2.5(svelte@5.43.0) svelte-persisted-store: specifier: ^0.12.0 - version: 0.12.0(svelte@5.41.3) + version: 0.12.0(svelte@5.43.0) tabbable: specifier: ^6.2.0 version: 6.3.0 @@ -800,25 +800,25 @@ importers: version: 3.1.2 '@sveltejs/adapter-static': specifier: ^3.0.8 - version: 3.0.10(@sveltejs/kit@2.47.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))) + version: 3.0.10(@sveltejs/kit@2.48.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))) '@sveltejs/enhanced-img': specifier: ^0.8.0 - version: 0.8.4(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(rollup@4.52.5)(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 0.8.4(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(rollup@4.52.5)(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@sveltejs/kit': specifier: ^2.27.1 - version: 2.47.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 2.48.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@sveltejs/vite-plugin-svelte': specifier: 6.2.1 - version: 6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@tailwindcss/vite': specifier: ^4.1.7 - version: 4.1.16(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 4.1.16(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@testing-library/jest-dom': specifier: ^6.4.2 version: 6.9.1 '@testing-library/svelte': specifier: ^5.2.8 - version: 5.2.8(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 5.2.8(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@testing-library/user-event': specifier: ^14.5.2 version: 14.6.1(@testing-library/dom@10.4.0) @@ -842,7 +842,7 @@ importers: version: 1.5.6 '@vitest/coverage-v8': specifier: ^3.0.0 - version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + version: 3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) dotenv: specifier: ^17.0.0 version: 17.2.3 @@ -857,7 +857,7 @@ importers: version: 6.0.2(eslint@9.38.0(jiti@2.6.1)) eslint-plugin-svelte: specifier: ^3.12.4 - version: 3.12.5(eslint@9.38.0(jiti@2.6.1))(svelte@5.41.3) + version: 3.12.5(eslint@9.38.0(jiti@2.6.1))(svelte@5.43.0) eslint-plugin-unicorn: specifier: ^61.0.2 version: 61.0.2(eslint@9.38.0(jiti@2.6.1)) @@ -878,19 +878,19 @@ importers: version: 4.1.1(prettier@3.6.2) prettier-plugin-svelte: specifier: ^3.3.3 - version: 3.4.0(prettier@3.6.2)(svelte@5.41.3) + version: 3.4.0(prettier@3.6.2)(svelte@5.43.0) rollup-plugin-visualizer: specifier: ^6.0.0 version: 6.0.5(rollup@4.52.5) svelte: - specifier: 5.41.3 - version: 5.41.3 + specifier: 5.43.0 + version: 5.43.0 svelte-check: specifier: ^4.1.5 - version: 4.3.3(picomatch@4.0.3)(svelte@5.41.3)(typescript@5.9.3) + version: 4.3.3(picomatch@4.0.3)(svelte@5.43.0)(typescript@5.9.3) svelte-eslint-parser: specifier: ^1.3.3 - version: 1.4.0(svelte@5.41.3) + version: 1.4.0(svelte@5.43.0) tailwindcss: specifier: ^4.1.7 version: 4.1.16 @@ -902,10 +902,10 @@ importers: version: 8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3) vite: specifier: ^7.1.2 - version: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + version: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) vitest: specifier: ^3.0.0 - version: 3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + version: 3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) packages: @@ -2241,8 +2241,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.25.11': - resolution: {integrity: sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==} + '@esbuild/aix-ppc64@0.25.12': + resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -2253,8 +2253,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.25.11': - resolution: {integrity: sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==} + '@esbuild/android-arm64@0.25.12': + resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -2265,8 +2265,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.25.11': - resolution: {integrity: sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==} + '@esbuild/android-arm@0.25.12': + resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -2277,8 +2277,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.25.11': - resolution: {integrity: sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==} + '@esbuild/android-x64@0.25.12': + resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -2289,8 +2289,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.25.11': - resolution: {integrity: sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==} + '@esbuild/darwin-arm64@0.25.12': + resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -2301,8 +2301,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.25.11': - resolution: {integrity: sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==} + '@esbuild/darwin-x64@0.25.12': + resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -2313,8 +2313,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.25.11': - resolution: {integrity: sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==} + '@esbuild/freebsd-arm64@0.25.12': + resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -2325,8 +2325,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.25.11': - resolution: {integrity: sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==} + '@esbuild/freebsd-x64@0.25.12': + resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -2337,8 +2337,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.25.11': - resolution: {integrity: sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==} + '@esbuild/linux-arm64@0.25.12': + resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -2349,8 +2349,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.25.11': - resolution: {integrity: sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==} + '@esbuild/linux-arm@0.25.12': + resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -2361,8 +2361,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.25.11': - resolution: {integrity: sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==} + '@esbuild/linux-ia32@0.25.12': + resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -2373,8 +2373,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.25.11': - resolution: {integrity: sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==} + '@esbuild/linux-loong64@0.25.12': + resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -2385,8 +2385,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.25.11': - resolution: {integrity: sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==} + '@esbuild/linux-mips64el@0.25.12': + resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -2397,8 +2397,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.25.11': - resolution: {integrity: sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==} + '@esbuild/linux-ppc64@0.25.12': + resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -2409,8 +2409,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.25.11': - resolution: {integrity: sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==} + '@esbuild/linux-riscv64@0.25.12': + resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -2421,8 +2421,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.25.11': - resolution: {integrity: sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==} + '@esbuild/linux-s390x@0.25.12': + resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -2433,14 +2433,14 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.25.11': - resolution: {integrity: sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==} + '@esbuild/linux-x64@0.25.12': + resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.25.11': - resolution: {integrity: sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==} + '@esbuild/netbsd-arm64@0.25.12': + resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] @@ -2451,14 +2451,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.25.11': - resolution: {integrity: sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==} + '@esbuild/netbsd-x64@0.25.12': + resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.25.11': - resolution: {integrity: sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==} + '@esbuild/openbsd-arm64@0.25.12': + resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -2469,14 +2469,14 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.25.11': - resolution: {integrity: sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==} + '@esbuild/openbsd-x64@0.25.12': + resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.25.11': - resolution: {integrity: sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==} + '@esbuild/openharmony-arm64@0.25.12': + resolution: {integrity: sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] @@ -2487,8 +2487,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.25.11': - resolution: {integrity: sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==} + '@esbuild/sunos-x64@0.25.12': + resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -2499,8 +2499,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.25.11': - resolution: {integrity: sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==} + '@esbuild/win32-arm64@0.25.12': + resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -2511,8 +2511,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.25.11': - resolution: {integrity: sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==} + '@esbuild/win32-ia32@0.25.12': + resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -2523,8 +2523,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.25.11': - resolution: {integrity: sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==} + '@esbuild/win32-x64@0.25.12': + resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -2779,13 +2779,13 @@ packages: '@immich/justified-layout-wasm@0.4.3': resolution: {integrity: sha512-fpcQ7zPhP3Cp1bEXhONVYSUeIANa2uzaQFGKufUZQo5FO7aFT77szTVChhlCy4XaVy5R4ZvgSkA/1TJmeORz7Q==} - '@immich/svelte-markdown-preprocess@0.0.1': - resolution: {integrity: sha512-1vWoT4LO6fEyxrKwLKiNFECEkRVbuvpYPDvA7LavObTt2ijnonPYBDgfTwCPTofjxcocIGYUayv3CzgOzFiMOA==} + '@immich/svelte-markdown-preprocess@0.1.0': + resolution: {integrity: sha512-jgSOJEGLPKEXQCNRI4r4YUayeM2b0ZYLdzgKGl891jZBhOQIetlY7rU44kPpV1AA3/8wGDwNFKduIQZZ/qJYzg==} peerDependencies: svelte: ^5.0.0 - '@immich/ui@0.40.2': - resolution: {integrity: sha512-6NS4yVx0VoyH+AaM7TISDaoIzZe3RuDOi6xMkK2LrOPQbKwTuheD2iagxsRYzUtJ9IPrmCPrwRBc9Jq5BkvmBQ==} + '@immich/ui@0.43.0': + resolution: {integrity: sha512-dwWIURsGghsbeFnqxCqUyWslyRU2vQjih7uewNr0nsW68bJ5/esl+V/Kiw2opiNiwI4Q3HEcuTRY57k4Hq+X3Q==} peerDependencies: svelte: ^5.0.0 @@ -3091,8 +3091,8 @@ packages: resolution: {integrity: sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==} engines: {node: '>=6.0.0'} - '@maplibre/maplibre-gl-style-spec@24.3.0': - resolution: {integrity: sha512-CTJc/Nvldv+GNQuis29VnyV0TYsFTgQBY3SNagTzZ28oHDsDYJ7LwEmfick4Z30wPwI/4gXe3se8PH2IIfLx2g==} + '@maplibre/maplibre-gl-style-spec@24.3.1': + resolution: {integrity: sha512-TUM5JD40H2mgtVXl5IwWz03BuQabw8oZQLJTmPpJA0YTYF+B+oZppy5lNMO6bMvHzB+/5mxqW9VLG3wFdeqtOw==} hasBin: true '@maplibre/vt-pbf@4.0.3': @@ -3181,8 +3181,8 @@ packages: '@swc/core': optional: true - '@nestjs/common@11.1.7': - resolution: {integrity: sha512-lwlObwGgIlpXSXYOTpfzdCepUyWomz6bv9qzGzzvpgspUxkj0Uz0fUJcvD44V8Ps7QhKW3lZBoYbXrH25UZrbA==} + '@nestjs/common@11.1.8': + resolution: {integrity: sha512-bbsOqwld/GdBfiRNc4nnjyWWENDEicq4SH+R5AuYatvf++vf1x5JIsHB1i1KtfZMD3eRte0D4K9WXuAYil6XAg==} peerDependencies: class-transformer: '>=0.4.1' class-validator: '>=0.13.2' @@ -3194,8 +3194,8 @@ packages: class-validator: optional: true - '@nestjs/core@11.1.7': - resolution: {integrity: sha512-TyXFOwjhHv/goSgJ8i20K78jwTM0iSpk9GBcC2h3mf4MxNy+znI8m7nWjfoACjTkb89cTwDQetfTHtSfGLLaiA==} + '@nestjs/core@11.1.8': + resolution: {integrity: sha512-7riWfmTmMhCJHZ5ZiaG+crj4t85IPCq/wLRuOUSigBYyFT2JZj0lVHtAdf4Davp9ouNI8GINBDt9h9b5Gz9nTw==} engines: {node: '>= 20'} peerDependencies: '@nestjs/common': ^11.0.0 @@ -3225,14 +3225,14 @@ packages: class-validator: optional: true - '@nestjs/platform-express@11.1.7': - resolution: {integrity: sha512-5T+GLdvTiGPKB4/P4PM9ftKUKNHJy8ThEFhZA3vQnXVL7Vf0rDr07TfVTySVu+XTh85m1lpFVuyFM6u6wLNsRA==} + '@nestjs/platform-express@11.1.8': + resolution: {integrity: sha512-rL6pZH9BW7BnL5X2eWbJMtt86uloAKjFgyY5+L2UkizgfEp7rgAs0+Z1z0BcW2Pgu5+q8O7RKPNyHJ/9ZNz/ZQ==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 - '@nestjs/platform-socket.io@11.1.7': - resolution: {integrity: sha512-suAyy5JWWvqU0fXbRp79Ihy7a1HSfB5rKgecVRmuQQyTi28W/0lsRsJN41plsxOEiXtaZq7sqiQp5Dg4XeUc9g==} + '@nestjs/platform-socket.io@11.1.8': + resolution: {integrity: sha512-nMUvwcdztso8BjN9czRl4sm0Ewc5xrCcgLvy+QPt6VAnTdu06KcZqtA6Cl3MKxViSQsQ8NBN5foKvZehNt/tug==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/websockets': ^11.0.0 @@ -3266,8 +3266,8 @@ packages: class-validator: optional: true - '@nestjs/testing@11.1.7': - resolution: {integrity: sha512-QbtrgSlc3QVo6RHNxTTlyhaiobLLy8kvhOlgWHsoXRknybuRs7vZg4k5mo3ye6pITGeT3CrWIRpZjUsh5Wps5Q==} + '@nestjs/testing@11.1.8': + resolution: {integrity: sha512-E6K+0UTKztcPxJzLnQa7S34lFjZbrj3Z1r7c5y5WDrL1m5HD1H4AeyBhicHgdaFmxjLAva2bq0sYKy/S7cdeYA==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 @@ -3279,8 +3279,8 @@ packages: '@nestjs/platform-express': optional: true - '@nestjs/websockets@11.1.7': - resolution: {integrity: sha512-FWPgZPN7yQWIeonQ7JL64Rbsbw/IQovft0cVC5UX1Jbsovq+rUaTuk3rilimGrawN9VOGcoiQLGNiIbmjjiCew==} + '@nestjs/websockets@11.1.8': + resolution: {integrity: sha512-RXo2336p/vyAwJ0qPInglzNSQ//qz+JTLr2LE1vlbmN5WcyB7zV6+gY06YgNdsr3oy/cXRh7fnC3Ph/VAu1EVg==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 @@ -3553,8 +3553,8 @@ packages: peerDependencies: '@photo-sphere-viewer/core': 5.14.0 - '@photostructure/tz-lookup@11.2.1': - resolution: {integrity: sha512-ugPtvpdLwGQ8IWezSGFgUCYOpO/XXetfKLNv+UN2jjTYyfIDq9dA21GydGyzXuoQ06nN3VGBd3JxmEu+ZtXScg==} + '@photostructure/tz-lookup@11.3.0': + resolution: {integrity: sha512-rYGy7ETBHTnXrwbzm47e3LJPKJmzpY7zXnbZhdosNU0lTGWVqzxptSjK4qZkJ1G+Kwy4F6XStNR9ZqMsXAoASQ==} '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} @@ -4094,8 +4094,8 @@ packages: svelte: ^5.0.0 vite: ^6.3.0 || >=7.0.0 - '@sveltejs/kit@2.47.3': - resolution: {integrity: sha512-zN2yzBc2dIES2BSzLhNP2weYhwB77kgM/oAktICZVmmljyEmPZrlUwr14jjdK9/eDu7WdAuf6gTdYIJLTcN3Fw==} + '@sveltejs/kit@2.48.3': + resolution: {integrity: sha512-jf8mx3yctRXE9hvixgcqqK94YI2hDnbxI/12Upkz99XFMvxnJKCMzvz0j7lmbXSyBSNEycWO5xHvi7b73y9qkQ==} engines: {node: '>=18.13'} hasBin: true peerDependencies: @@ -4200,68 +4200,68 @@ packages: resolution: {integrity: sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==} engines: {node: '>=14'} - '@swc/core-darwin-arm64@1.13.5': - resolution: {integrity: sha512-lKNv7SujeXvKn16gvQqUQI5DdyY8v7xcoO3k06/FJbHJS90zEwZdQiMNRiqpYw/orU543tPaWgz7cIYWhbopiQ==} + '@swc/core-darwin-arm64@1.14.0': + resolution: {integrity: sha512-uHPC8rlCt04nvYNczWzKVdgnRhxCa3ndKTBBbBpResOZsRmiwRAvByIGh599j+Oo6Z5eyTPrgY+XfJzVmXnN7Q==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.13.5': - resolution: {integrity: sha512-ILd38Fg/w23vHb0yVjlWvQBoE37ZJTdlLHa8LRCFDdX4WKfnVBiblsCU9ar4QTMNdeTBEX9iUF4IrbNWhaF1Ng==} + '@swc/core-darwin-x64@1.14.0': + resolution: {integrity: sha512-2SHrlpl68vtePRknv9shvM9YKKg7B9T13tcTg9aFCwR318QTYo+FzsKGmQSv9ox/Ua0Q2/5y2BNjieffJoo4nA==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.13.5': - resolution: {integrity: sha512-Q6eS3Pt8GLkXxqz9TAw+AUk9HpVJt8Uzm54MvPsqp2yuGmY0/sNaPPNVqctCX9fu/Nu8eaWUen0si6iEiCsazQ==} + '@swc/core-linux-arm-gnueabihf@1.14.0': + resolution: {integrity: sha512-SMH8zn01dxt809svetnxpeg/jWdpi6dqHKO3Eb11u4OzU2PK7I5uKS6gf2hx5LlTbcJMFKULZiVwjlQLe8eqtg==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.13.5': - resolution: {integrity: sha512-aNDfeN+9af+y+M2MYfxCzCy/VDq7Z5YIbMqRI739o8Ganz6ST+27kjQFd8Y/57JN/hcnUEa9xqdS3XY7WaVtSw==} + '@swc/core-linux-arm64-gnu@1.14.0': + resolution: {integrity: sha512-q2JRu2D8LVqGeHkmpVCljVNltG0tB4o4eYg+dElFwCS8l2Mnt9qurMCxIeo9mgoqz0ax+k7jWtIRHktnVCbjvQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.13.5': - resolution: {integrity: sha512-9+ZxFN5GJag4CnYnq6apKTnnezpfJhCumyz0504/JbHLo+Ue+ZtJnf3RhyA9W9TINtLE0bC4hKpWi8ZKoETyOQ==} + '@swc/core-linux-arm64-musl@1.14.0': + resolution: {integrity: sha512-uofpVoPCEUjYIv454ZEZ3sLgMD17nIwlz2z7bsn7rl301Kt/01umFA7MscUovFfAK2IRGck6XB+uulMu6aFhKQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.13.5': - resolution: {integrity: sha512-WD530qvHrki8Ywt/PloKUjaRKgstQqNGvmZl54g06kA+hqtSE2FTG9gngXr3UJxYu/cNAjJYiBifm7+w4nbHbA==} + '@swc/core-linux-x64-gnu@1.14.0': + resolution: {integrity: sha512-quTTx1Olm05fBfv66DEBuOsOgqdypnZ/1Bh3yGXWY7ANLFeeRpCDZpljD9BSjdsNdPOlwJmEUZXMHtGm3v1TZQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.13.5': - resolution: {integrity: sha512-Luj8y4OFYx4DHNQTWjdIuKTq2f5k6uSXICqx+FSabnXptaOBAbJHNbHT/06JZh6NRUouaf0mYXN0mcsqvkhd7Q==} + '@swc/core-linux-x64-musl@1.14.0': + resolution: {integrity: sha512-caaNAu+aIqT8seLtCf08i8C3/UC5ttQujUjejhMcuS1/LoCKtNiUs4VekJd2UGt+pyuuSrQ6dKl8CbCfWvWeXw==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.13.5': - resolution: {integrity: sha512-cZ6UpumhF9SDJvv4DA2fo9WIzlNFuKSkZpZmPG1c+4PFSEMy5DFOjBSllCvnqihCabzXzpn6ykCwBmHpy31vQw==} + '@swc/core-win32-arm64-msvc@1.14.0': + resolution: {integrity: sha512-EeW3jFlT3YNckJ6V/JnTfGcX7UHGyh6/AiCPopZ1HNaGiXVCKHPpVQZicmtyr/UpqxCXLrTgjHOvyMke7YN26A==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.13.5': - resolution: {integrity: sha512-C5Yi/xIikrFUzZcyGj9L3RpKljFvKiDMtyDzPKzlsDrKIw2EYY+bF88gB6oGY5RGmv4DAX8dbnpRAqgFD0FMEw==} + '@swc/core-win32-ia32-msvc@1.14.0': + resolution: {integrity: sha512-dPai3KUIcihV5hfoO4QNQF5HAaw8+2bT7dvi8E5zLtecW2SfL3mUZipzampXq5FHll0RSCLzlrXnSx+dBRZIIQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.13.5': - resolution: {integrity: sha512-YrKdMVxbYmlfybCSbRtrilc6UA8GF5aPmGKBdPvjrarvsmf4i7ZHGCEnLtfOMd3Lwbs2WUZq3WdMbozYeLU93Q==} + '@swc/core-win32-x64-msvc@1.14.0': + resolution: {integrity: sha512-nm+JajGrTqUA6sEHdghDlHMNfH1WKSiuvljhdmBACW4ta4LC3gKurX2qZuiBARvPkephW9V/i5S8QPY1PzFEqg==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.13.5': - resolution: {integrity: sha512-WezcBo8a0Dg2rnR82zhwoR6aRNxeTGfK5QCD6TQ+kg3xx/zNT02s/0o+81h/3zhvFSB24NtqEr8FTw88O5W/JQ==} + '@swc/core@1.14.0': + resolution: {integrity: sha512-oExhY90bes5pDTVrei0xlMVosTxwd/NMafIpqsC4dMbRYZ5KB981l/CX8tMnGsagTplj/RcG9BeRYmV6/J5m3w==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '>=0.5.17' @@ -4653,11 +4653,11 @@ packages: '@types/node@20.19.24': resolution: {integrity: sha512-FE5u0ezmi6y9OZEzlJfg37mqqf6ZDSF2V/NLjUyGrR9uTZ7Sb9F7bLNZ03S4XVUNRWGA7Ck4c1kK+YnuWjl+DA==} - '@types/node@22.18.13': - resolution: {integrity: sha512-Bo45YKIjnmFtv6I1TuC8AaHBbqXtIo+Om5fE4QiU1Tj8QR/qt+8O3BAtOimG5IFmwaWiPmB3Mv3jtYzBA4Us2A==} + '@types/node@22.19.0': + resolution: {integrity: sha512-xpr/lmLPQEj+TUnHmR+Ab91/glhJvsqcjB+yY0Ix9GO70H6Lb4FHH5GeqdOE5btAx7eIMwuHkp4H2MSkLcqWbA==} - '@types/node@24.9.2': - resolution: {integrity: sha512-uWN8YqxXxqFMX2RqGOrumsKeti4LlmIMIyV0lgut4jx7KQBcBiW6vkDtIBvHnHIquwNfJhk8v2OtmO8zXWHfPA==} + '@types/node@24.10.0': + resolution: {integrity: sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==} '@types/nodemailer@7.0.3': resolution: {integrity: sha512-fC8w49YQ868IuPWRXqPfLf+MuTRex5Z1qxMoG8rr70riqqbOp2F5xgOKE9fODEBPzpnvjkJXFgK6IL2xgMSTnA==} @@ -4674,6 +4674,9 @@ packages: '@types/pg@8.15.5': resolution: {integrity: sha512-LF7lF6zWEKxuT3/OR8wAZGzkg4ENGXFNyiV/JeOt9z5B+0ZVwbql9McqX5c/WStFq1GaGso7H1AzP/qSzmlCKQ==} + '@types/pg@8.15.6': + resolution: {integrity: sha512-NoaMtzhxOrubeL/7UZuNTrejB4MPAJ0RpxZqXQf2qXuVlTPuG6Y8p4u9dKRaue4yjmC7ZhzVO2/Yyyn25znrPQ==} + '@types/picomatch@4.0.2': resolution: {integrity: sha512-qHHxQ+P9PysNEGbALT8f8YOSHW0KJu6l2xU8DYY0fu/EmGxXdVnuTLvFUvBgPJMSqXq29SYHveejeAha+4AYgA==} @@ -4764,8 +4767,8 @@ packages: '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@types/validator@13.15.3': - resolution: {integrity: sha512-7bcUmDyS6PN3EuD9SlGGOxM77F8WLVsrwkxyWxKnxzmXoequ6c7741QBrANq6htVRGOITJ7z72mTP6Z4XyuG+Q==} + '@types/validator@13.15.4': + resolution: {integrity: sha512-LSFfpSnJJY9wbC0LQxgvfb+ynbHftFo0tMsFOl/J4wexLnYMmDSPaj2ZyDv3TkfL1UePxPrxOWJfbiRS8mQv7A==} '@types/whatwg-mimetype@3.0.2': resolution: {integrity: sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA==} @@ -5381,8 +5384,8 @@ packages: resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==} engines: {node: '>=18.20'} - bullmq@5.61.2: - resolution: {integrity: sha512-b39hbiq/xXpOTT/OfmKpQYD+4VE4+XUlvdZ6GjbGl9asmRk8cSvUaQWD18jVCn1I0SzIfbrgOf+RAkqjXDUhJg==} + bullmq@5.62.1: + resolution: {integrity: sha512-FiRxqSquGTf8W8l8OMczKfEFG0BEqJ5NzChwKZ4vbSpZSPFLSmmxXAQlW4imB1rZHnlc7sYq8o+Oy4JavoIEpQ==} bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} @@ -6413,8 +6416,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.25.11: - resolution: {integrity: sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==} + esbuild@0.25.12: + resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==} engines: {node: '>=18'} hasBin: true @@ -6627,17 +6630,17 @@ packages: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} - exiftool-vendored.exe@13.38.0: - resolution: {integrity: sha512-oZx5enTAvSiIAXL+OEk7nNWrfUhEdKUpaGwDjCmz4VKwOa4HbisqyM808xPGPYj8X7XikcME/fq5hvevPeE3cw==} + exiftool-vendored.exe@13.41.0: + resolution: {integrity: sha512-7XG0PjZCm8HVsVUQAD4b/eBtvYBuGkySf2qslqHlnSR6jU1xoD1AgEprb2bCPqwhw0Jn3xzZoo/ihDo4F6fMyA==} os: [win32] - exiftool-vendored.pl@13.38.0: - resolution: {integrity: sha512-Q3xl1nnwswrsR5344z4NyqvI74fKwla+VJHY1N+32gcDgt8cs9KBsDUwcNzKHSOSa/MjEfniuCJVrQiqR05iag==} + exiftool-vendored.pl@13.41.0: + resolution: {integrity: sha512-JqqRuB8TggIOC983oTnOunB/baseGYw8XCkn7ylFGOmEv7oTQAK3uUTZV76vXE1X6c5H6IdHYt0abSgi8Kzc4g==} os: ['!win32'] hasBin: true - exiftool-vendored@31.1.0: - resolution: {integrity: sha512-q8StxLawHLDvhqv/uoBYCfVbDskn49Cr5ouNCZhh4lgryGu1aymHwK9AvO6RcW2SbPm5MSnQDJOfGp2MW5Nnrw==} + exiftool-vendored@31.3.0: + resolution: {integrity: sha512-JQeyRvh7cV81fm9eKej2btdVh2z2Ak/sx89c4OCykeQnhnI81hk9TTraBtborYA+WcLM20cwYMPmpaW/sMy5Qw==} engines: {node: '>=20.0.0'} expect-type@1.2.1: @@ -7054,8 +7057,8 @@ packages: engines: {node: '>=0.4.7'} hasBin: true - happy-dom@20.0.8: - resolution: {integrity: sha512-TlYaNQNtzsZ97rNMBAm8U+e2cUQXNithgfCizkDgc11lgmN4j9CKMhO3FPGKWQYPwwkFcPpoXYF/CqEPLgzfOg==} + happy-dom@20.0.10: + resolution: {integrity: sha512-6umCCHcjQrhP5oXhrHQQvLB0bwb1UzHAHdsXy+FjtKoYjUhmNZsQL8NivwM1vDvNEChJabVrUYxUnp/ZdYmy2g==} engines: {node: '>=20.0.0'} has-flag@4.0.0: @@ -8021,8 +8024,8 @@ packages: resolution: {integrity: sha512-p8lJFEiqmEQlyv+DQxFAOG/XPWN0Wp7j/Psq93Zywz7qt9CcUKFYDBOoOEKzqe6gudHVJY8/Bhqw6VDpX2lSBg==} engines: {node: '>=6.4.0'} - maplibre-gl@5.9.0: - resolution: {integrity: sha512-YxW9glb/YrDXGDhqy1u+aG113+L86ttAUpTd6sCkGHyUKMXOX8qbGHJQVqxOczy+4CtRKnqcCfSura2MzB0nQA==} + maplibre-gl@5.10.0: + resolution: {integrity: sha512-eLhlX8Fnpaoo7+uGqggZmXmZld6WrbzOJUPB7G8JB8XpminlTnrQTtXilMHduR8fsNVxrzD8yRRqEoajONc8LQ==} engines: {node: '>=16.14.0', npm: '>=8.1.0'} mark.js@8.11.1: @@ -9676,8 +9679,8 @@ packages: peerDependencies: react: ^19.2.0 - react-email@4.3.1: - resolution: {integrity: sha512-GBgI7fl0fXVFVQ4zlXG+x14egDNX1WVlOrAXKMyc1h9xeTnIAt/u3g1liU4v+7Yv3yprMSkZ1mIO3YPuTKo77A==} + react-email@4.3.2: + resolution: {integrity: sha512-WaZcnv9OAIRULY236zDRdk+8r511ooJGH5UOb7FnVsV33hGPI+l5aIZ6drVjXi4QrlLTmLm8PsYvmXRSv31MPA==} engines: {node: '>=18.0.0'} hasBin: true @@ -10171,8 +10174,8 @@ packages: simple-get@3.1.1: resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} - simple-icons@15.17.0: - resolution: {integrity: sha512-viOcugYj+JFYVWJvDh4Ph1xHk9iTGhzt+NoPrfAQYSCADvmZFSQUWyKEbSMuqVRUsaRgvADn+Cczysemsf1N3Q==} + simple-icons@15.18.0: + resolution: {integrity: sha512-lYpvaIuZZr6N50YSdYZQzrKccSSF3dqcgcoz2vMKVQCc/fJWD8nFszJVZz2tCDTSu082rqRYfuYRUPhjdixDAA==} engines: {node: '>=0.12.18'} sirv@2.0.4: @@ -10483,8 +10486,8 @@ packages: peerDependencies: svelte: ^3 || ^4 || ^5 - svelte-maplibre@1.2.3: - resolution: {integrity: sha512-2EToGWdSlTq9Tr7MLmUlve3J86uDM9D6s5ErY/oc5LEsktd0TCTPXM1HJ1IGSaa+ElxCv/ka/igvGPb6L4BhLw==} + svelte-maplibre@1.2.5: + resolution: {integrity: sha512-Uklcbi6inW9GA0MuSusbXmFr/MQPmXrjuP8hS1+yFX3ySvCQ477tsM3I7Jo/fUDK3XAxFSIHW6hZfucnM3kXwQ==} peerDependencies: '@deck.gl/core': ^9 '@deck.gl/layers': ^9 @@ -10515,8 +10518,8 @@ packages: peerDependencies: svelte: ^5.30.2 - svelte@5.41.3: - resolution: {integrity: sha512-bkHg+whEnVVNcK3XP8Dy4NHujn5mU/+at9z09PXM5THKm+E73AwiKFoRMMTfyAzAj1yExKtudvGHq8UqOh8kMQ==} + svelte@5.43.0: + resolution: {integrity: sha512-1sRxVbgJAB+UGzwkc3GUoiBSzEOf0jqzccMaVoI2+pI+kASUe9qubslxace8+Mzhqw19k4syTA5niCIJwfXpOA==} engines: {node: '>=18'} svg-parser@2.0.4: @@ -11717,11 +11720,11 @@ snapshots: optionalDependencies: chokidar: 4.0.3 - '@angular-devkit/schematics-cli@19.2.15(@types/node@22.18.13)(chokidar@4.0.3)': + '@angular-devkit/schematics-cli@19.2.15(@types/node@22.19.0)(chokidar@4.0.3)': dependencies: '@angular-devkit/core': 19.2.15(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.15(chokidar@4.0.3) - '@inquirer/prompts': 7.3.2(@types/node@22.18.13) + '@inquirer/prompts': 7.3.2(@types/node@22.19.0) ansi-colors: 4.1.3 symbol-observable: 4.0.0 yargs-parser: 21.1.1 @@ -13971,155 +13974,150 @@ snapshots: '@esbuild/aix-ppc64@0.19.12': optional: true - '@esbuild/aix-ppc64@0.25.11': + '@esbuild/aix-ppc64@0.25.12': optional: true '@esbuild/android-arm64@0.19.12': optional: true - '@esbuild/android-arm64@0.25.11': + '@esbuild/android-arm64@0.25.12': optional: true '@esbuild/android-arm@0.19.12': optional: true - '@esbuild/android-arm@0.25.11': + '@esbuild/android-arm@0.25.12': optional: true '@esbuild/android-x64@0.19.12': optional: true - '@esbuild/android-x64@0.25.11': + '@esbuild/android-x64@0.25.12': optional: true '@esbuild/darwin-arm64@0.19.12': optional: true - '@esbuild/darwin-arm64@0.25.11': + '@esbuild/darwin-arm64@0.25.12': optional: true '@esbuild/darwin-x64@0.19.12': optional: true - '@esbuild/darwin-x64@0.25.11': + '@esbuild/darwin-x64@0.25.12': optional: true '@esbuild/freebsd-arm64@0.19.12': optional: true - '@esbuild/freebsd-arm64@0.25.11': + '@esbuild/freebsd-arm64@0.25.12': optional: true '@esbuild/freebsd-x64@0.19.12': optional: true - '@esbuild/freebsd-x64@0.25.11': + '@esbuild/freebsd-x64@0.25.12': optional: true '@esbuild/linux-arm64@0.19.12': optional: true - '@esbuild/linux-arm64@0.25.11': + '@esbuild/linux-arm64@0.25.12': optional: true '@esbuild/linux-arm@0.19.12': optional: true - '@esbuild/linux-arm@0.25.11': + '@esbuild/linux-arm@0.25.12': optional: true '@esbuild/linux-ia32@0.19.12': optional: true - '@esbuild/linux-ia32@0.25.11': + '@esbuild/linux-ia32@0.25.12': optional: true '@esbuild/linux-loong64@0.19.12': optional: true - '@esbuild/linux-loong64@0.25.11': + '@esbuild/linux-loong64@0.25.12': optional: true '@esbuild/linux-mips64el@0.19.12': optional: true - '@esbuild/linux-mips64el@0.25.11': + '@esbuild/linux-mips64el@0.25.12': optional: true '@esbuild/linux-ppc64@0.19.12': optional: true - '@esbuild/linux-ppc64@0.25.11': + '@esbuild/linux-ppc64@0.25.12': optional: true '@esbuild/linux-riscv64@0.19.12': optional: true - '@esbuild/linux-riscv64@0.25.11': + '@esbuild/linux-riscv64@0.25.12': optional: true '@esbuild/linux-s390x@0.19.12': optional: true - '@esbuild/linux-s390x@0.25.11': + '@esbuild/linux-s390x@0.25.12': optional: true '@esbuild/linux-x64@0.19.12': optional: true - '@esbuild/linux-x64@0.25.11': + '@esbuild/linux-x64@0.25.12': optional: true - '@esbuild/netbsd-arm64@0.25.11': + '@esbuild/netbsd-arm64@0.25.12': optional: true '@esbuild/netbsd-x64@0.19.12': optional: true - '@esbuild/netbsd-x64@0.25.11': + '@esbuild/netbsd-x64@0.25.12': optional: true - '@esbuild/openbsd-arm64@0.25.11': + '@esbuild/openbsd-arm64@0.25.12': optional: true '@esbuild/openbsd-x64@0.19.12': optional: true - '@esbuild/openbsd-x64@0.25.11': + '@esbuild/openbsd-x64@0.25.12': optional: true - '@esbuild/openharmony-arm64@0.25.11': + '@esbuild/openharmony-arm64@0.25.12': optional: true '@esbuild/sunos-x64@0.19.12': optional: true - '@esbuild/sunos-x64@0.25.11': + '@esbuild/sunos-x64@0.25.12': optional: true '@esbuild/win32-arm64@0.19.12': optional: true - '@esbuild/win32-arm64@0.25.11': + '@esbuild/win32-arm64@0.25.12': optional: true '@esbuild/win32-ia32@0.19.12': optional: true - '@esbuild/win32-ia32@0.25.11': + '@esbuild/win32-ia32@0.25.12': optional: true '@esbuild/win32-x64@0.19.12': optional: true - '@esbuild/win32-x64@0.25.11': + '@esbuild/win32-x64@0.25.12': optional: true - '@eslint-community/eslint-utils@4.9.0(eslint@9.38.0(jiti@1.21.7))': - dependencies: - eslint: 9.38.0(jiti@1.21.7) - eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.9.0(eslint@9.38.0(jiti@2.6.1))': dependencies: eslint: 9.38.0(jiti@2.6.1) @@ -14219,10 +14217,10 @@ snapshots: dependencies: tslib: 2.8.1 - '@golevelup/nestjs-discovery@5.0.0(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)': + '@golevelup/nestjs-discovery@5.0.0(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) lodash: 4.17.21 '@grpc/grpc-js@1.14.0': @@ -14351,18 +14349,18 @@ snapshots: '@immich/justified-layout-wasm@0.4.3': {} - '@immich/svelte-markdown-preprocess@0.0.1(svelte@5.41.3)': + '@immich/svelte-markdown-preprocess@0.1.0(svelte@5.43.0)': dependencies: - svelte: 5.41.3 + svelte: 5.43.0 - '@immich/ui@0.40.2(@internationalized/date@3.8.2)(svelte@5.41.3)': + '@immich/ui@0.43.0(@internationalized/date@3.8.2)(svelte@5.43.0)': dependencies: - '@immich/svelte-markdown-preprocess': 0.0.1(svelte@5.41.3) + '@immich/svelte-markdown-preprocess': 0.1.0(svelte@5.43.0) '@mdi/js': 7.4.47 - bits-ui: 2.9.8(@internationalized/date@3.8.2)(svelte@5.41.3) + bits-ui: 2.9.8(@internationalized/date@3.8.2)(svelte@5.43.0) luxon: 3.7.2 - simple-icons: 15.17.0 - svelte: 5.41.3 + simple-icons: 15.18.0 + svelte: 5.43.0 svelte-highlight: 7.8.4 tailwind-merge: 3.3.1 tailwind-variants: 3.1.1(tailwind-merge@3.3.1)(tailwindcss@4.1.16) @@ -14370,27 +14368,27 @@ snapshots: transitivePeerDependencies: - '@internationalized/date' - '@inquirer/checkbox@4.2.1(@types/node@22.18.13)': + '@inquirer/checkbox@4.2.1(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/type': 3.0.8(@types/node@22.19.0) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/confirm@5.1.15(@types/node@22.18.13)': + '@inquirer/confirm@5.1.15(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/core@10.1.15(@types/node@22.18.13)': + '@inquirer/core@10.1.15(@types/node@22.19.0)': dependencies: '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/type': 3.0.8(@types/node@22.19.0) ansi-escapes: 4.3.2 cli-width: 4.1.0 mute-stream: 2.0.0 @@ -14398,115 +14396,115 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/editor@4.2.17(@types/node@22.18.13)': + '@inquirer/editor@4.2.17(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/external-editor': 1.0.2(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/external-editor': 1.0.2(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/expand@4.0.17(@types/node@22.18.13)': + '@inquirer/expand@4.0.17(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/external-editor@1.0.2(@types/node@22.18.13)': + '@inquirer/external-editor@1.0.2(@types/node@22.19.0)': dependencies: chardet: 2.1.0 iconv-lite: 0.7.0 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@inquirer/figures@1.0.13': {} - '@inquirer/input@4.2.1(@types/node@22.18.13)': + '@inquirer/input@4.2.1(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/number@3.0.17(@types/node@22.18.13)': + '@inquirer/number@3.0.17(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/password@4.0.17(@types/node@22.18.13)': + '@inquirer/password@4.0.17(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) ansi-escapes: 4.3.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/prompts@7.3.2(@types/node@22.18.13)': + '@inquirer/prompts@7.3.2(@types/node@22.19.0)': dependencies: - '@inquirer/checkbox': 4.2.1(@types/node@22.18.13) - '@inquirer/confirm': 5.1.15(@types/node@22.18.13) - '@inquirer/editor': 4.2.17(@types/node@22.18.13) - '@inquirer/expand': 4.0.17(@types/node@22.18.13) - '@inquirer/input': 4.2.1(@types/node@22.18.13) - '@inquirer/number': 3.0.17(@types/node@22.18.13) - '@inquirer/password': 4.0.17(@types/node@22.18.13) - '@inquirer/rawlist': 4.1.5(@types/node@22.18.13) - '@inquirer/search': 3.1.0(@types/node@22.18.13) - '@inquirer/select': 4.3.1(@types/node@22.18.13) + '@inquirer/checkbox': 4.2.1(@types/node@22.19.0) + '@inquirer/confirm': 5.1.15(@types/node@22.19.0) + '@inquirer/editor': 4.2.17(@types/node@22.19.0) + '@inquirer/expand': 4.0.17(@types/node@22.19.0) + '@inquirer/input': 4.2.1(@types/node@22.19.0) + '@inquirer/number': 3.0.17(@types/node@22.19.0) + '@inquirer/password': 4.0.17(@types/node@22.19.0) + '@inquirer/rawlist': 4.1.5(@types/node@22.19.0) + '@inquirer/search': 3.1.0(@types/node@22.19.0) + '@inquirer/select': 4.3.1(@types/node@22.19.0) optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/prompts@7.8.0(@types/node@22.18.13)': + '@inquirer/prompts@7.8.0(@types/node@22.19.0)': dependencies: - '@inquirer/checkbox': 4.2.1(@types/node@22.18.13) - '@inquirer/confirm': 5.1.15(@types/node@22.18.13) - '@inquirer/editor': 4.2.17(@types/node@22.18.13) - '@inquirer/expand': 4.0.17(@types/node@22.18.13) - '@inquirer/input': 4.2.1(@types/node@22.18.13) - '@inquirer/number': 3.0.17(@types/node@22.18.13) - '@inquirer/password': 4.0.17(@types/node@22.18.13) - '@inquirer/rawlist': 4.1.5(@types/node@22.18.13) - '@inquirer/search': 3.1.0(@types/node@22.18.13) - '@inquirer/select': 4.3.1(@types/node@22.18.13) + '@inquirer/checkbox': 4.2.1(@types/node@22.19.0) + '@inquirer/confirm': 5.1.15(@types/node@22.19.0) + '@inquirer/editor': 4.2.17(@types/node@22.19.0) + '@inquirer/expand': 4.0.17(@types/node@22.19.0) + '@inquirer/input': 4.2.1(@types/node@22.19.0) + '@inquirer/number': 3.0.17(@types/node@22.19.0) + '@inquirer/password': 4.0.17(@types/node@22.19.0) + '@inquirer/rawlist': 4.1.5(@types/node@22.19.0) + '@inquirer/search': 3.1.0(@types/node@22.19.0) + '@inquirer/select': 4.3.1(@types/node@22.19.0) optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/rawlist@4.1.5(@types/node@22.18.13)': + '@inquirer/rawlist@4.1.5(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) + '@inquirer/type': 3.0.8(@types/node@22.19.0) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/search@3.1.0(@types/node@22.18.13)': + '@inquirer/search@3.1.0(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/type': 3.0.8(@types/node@22.19.0) yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/select@4.3.1(@types/node@22.18.13)': + '@inquirer/select@4.3.1(@types/node@22.19.0)': dependencies: - '@inquirer/core': 10.1.15(@types/node@22.18.13) + '@inquirer/core': 10.1.15(@types/node@22.19.0) '@inquirer/figures': 1.0.13 - '@inquirer/type': 3.0.8(@types/node@22.18.13) + '@inquirer/type': 3.0.8(@types/node@22.19.0) ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 - '@inquirer/type@3.0.8(@types/node@22.18.13)': + '@inquirer/type@3.0.8(@types/node@22.19.0)': optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@internationalized/date@3.8.2': dependencies: @@ -14544,7 +14542,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/yargs': 17.0.34 chalk: 4.1.2 @@ -14710,7 +14708,7 @@ snapshots: '@mapbox/whoots-js@3.1.0': {} - '@maplibre/maplibre-gl-style-spec@24.3.0': + '@maplibre/maplibre-gl-style-spec@24.3.1': dependencies: '@mapbox/jsonlint-lines-primitives': 2.0.2 '@mapbox/unitbezier': 0.0.1 @@ -14798,32 +14796,32 @@ snapshots: '@namnode/store@0.1.0': {} - '@nestjs/bull-shared@11.0.4(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)': + '@nestjs/bull-shared@11.0.4(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) tslib: 2.8.1 - '@nestjs/bullmq@11.0.4(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(bullmq@5.61.2)': + '@nestjs/bullmq@11.0.4(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(bullmq@5.62.1)': dependencies: - '@nestjs/bull-shared': 11.0.4(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) - bullmq: 5.61.2 + '@nestjs/bull-shared': 11.0.4(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) + bullmq: 5.62.1 tslib: 2.8.1 - '@nestjs/cli@11.0.10(@swc/core@1.13.5(@swc/helpers@0.5.17))(@types/node@22.18.13)': + '@nestjs/cli@11.0.10(@swc/core@1.14.0(@swc/helpers@0.5.17))(@types/node@22.19.0)': dependencies: '@angular-devkit/core': 19.2.15(chokidar@4.0.3) '@angular-devkit/schematics': 19.2.15(chokidar@4.0.3) - '@angular-devkit/schematics-cli': 19.2.15(@types/node@22.18.13)(chokidar@4.0.3) - '@inquirer/prompts': 7.8.0(@types/node@22.18.13) + '@angular-devkit/schematics-cli': 19.2.15(@types/node@22.19.0)(chokidar@4.0.3) + '@inquirer/prompts': 7.8.0(@types/node@22.19.0) '@nestjs/schematics': 11.0.9(chokidar@4.0.3)(typescript@5.8.3) ansis: 4.1.0 chokidar: 4.0.3 cli-table3: 0.6.5 commander: 4.1.1 - fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.8.3)(webpack@5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17))) + fork-ts-checker-webpack-plugin: 9.1.0(typescript@5.8.3)(webpack@5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17))) glob: 11.0.3 node-emoji: 1.11.0 ora: 5.4.1 @@ -14831,17 +14829,17 @@ snapshots: tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.2.0 typescript: 5.8.3 - webpack: 5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17)) + webpack: 5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17)) webpack-node-externals: 3.0.0 optionalDependencies: - '@swc/core': 1.13.5(@swc/helpers@0.5.17) + '@swc/core': 1.14.0(@swc/helpers@0.5.17) transitivePeerDependencies: - '@types/node' - esbuild - uglify-js - webpack-cli - '@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: file-type: 21.0.0 iterare: 1.2.1 @@ -14856,9 +14854,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@nestjs/core@11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/core@11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@nuxt/opencollective': 0.4.1 fast-safe-stringify: 2.1.1 iterare: 1.2.1 @@ -14868,21 +14866,21 @@ snapshots: tslib: 2.8.1 uid: 2.0.2 optionalDependencies: - '@nestjs/platform-express': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) - '@nestjs/websockets': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@nestjs/platform-socket.io@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/platform-express': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) + '@nestjs/websockets': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@nestjs/platform-socket.io@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/mapped-types@2.1.0(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)': + '@nestjs/mapped-types@2.1.0(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) reflect-metadata: 0.2.2 optionalDependencies: class-transformer: 0.5.1 class-validator: 0.14.2 - '@nestjs/platform-express@11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)': + '@nestjs/platform-express@11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) cors: 2.8.5 express: 5.1.0 multer: 2.0.2 @@ -14891,10 +14889,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@nestjs/platform-socket.io@11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.7)(rxjs@7.8.2)': + '@nestjs/platform-socket.io@11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.8)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/websockets': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@nestjs/platform-socket.io@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/websockets': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@nestjs/platform-socket.io@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) rxjs: 7.8.2 socket.io: 4.8.1 tslib: 2.8.1 @@ -14903,10 +14901,10 @@ snapshots: - supports-color - utf-8-validate - '@nestjs/schedule@6.0.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)': + '@nestjs/schedule@6.0.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) cron: 4.3.3 '@nestjs/schematics@11.0.9(chokidar@4.0.3)(typescript@5.8.3)': @@ -14931,12 +14929,12 @@ snapshots: transitivePeerDependencies: - chokidar - '@nestjs/swagger@11.2.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)': + '@nestjs/swagger@11.2.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)': dependencies: '@microsoft/tsdoc': 0.15.1 - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/mapped-types': 2.1.0(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/mapped-types': 2.1.0(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2) js-yaml: 4.1.0 lodash: 4.17.21 path-to-regexp: 8.3.0 @@ -14946,25 +14944,25 @@ snapshots: class-transformer: 0.5.1 class-validator: 0.14.2 - '@nestjs/testing@11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@nestjs/platform-express@11.1.7)': + '@nestjs/testing@11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@nestjs/platform-express@11.1.8)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) tslib: 2.8.1 optionalDependencies: - '@nestjs/platform-express': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) + '@nestjs/platform-express': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) - '@nestjs/websockets@11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@nestjs/platform-socket.io@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2)': + '@nestjs/websockets@11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@nestjs/platform-socket.io@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2)': dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) iterare: 1.2.1 object-hash: 3.0.0 reflect-metadata: 0.2.2 rxjs: 7.8.2 tslib: 2.8.1 optionalDependencies: - '@nestjs/platform-socket.io': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.7)(rxjs@7.8.2) + '@nestjs/platform-socket.io': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/websockets@11.1.8)(rxjs@7.8.2) '@noble/hashes@1.8.0': {} @@ -15305,7 +15303,7 @@ snapshots: '@photo-sphere-viewer/core': 5.14.0 three: 0.180.0 - '@photostructure/tz-lookup@11.2.1': {} + '@photostructure/tz-lookup@11.3.0': {} '@pkgjs/parseargs@0.11.0': optional: true @@ -15867,29 +15865,29 @@ snapshots: dependencies: acorn: 8.15.0 - '@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.47.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))': + '@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.48.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))': dependencies: - '@sveltejs/kit': 2.47.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@sveltejs/kit': 2.48.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) - '@sveltejs/enhanced-img@0.8.4(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(rollup@4.52.5)(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@sveltejs/enhanced-img@0.8.4(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(rollup@4.52.5)(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) magic-string: 0.30.21 sharp: 0.34.4 - svelte: 5.41.3 - svelte-parse-markup: 0.1.5(svelte@5.41.3) - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + svelte: 5.43.0 + svelte-parse-markup: 0.1.5(svelte@5.43.0) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) vite-imagetools: 8.0.0(rollup@4.52.5) zimmerframe: 1.1.4 transitivePeerDependencies: - rollup - supports-color - '@sveltejs/kit@2.47.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@sveltejs/kit@2.48.3(@opentelemetry/api@1.9.0)(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@standard-schema/spec': 1.0.0 '@sveltejs/acorn-typescript': 1.0.6(acorn@8.15.0) - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@types/cookie': 0.6.0 acorn: 8.15.0 cookie: 0.6.0 @@ -15901,29 +15899,29 @@ snapshots: sade: 1.8.1 set-cookie-parser: 2.7.2 sirv: 3.0.2 - svelte: 5.41.3 - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + svelte: 5.43.0 + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) optionalDependencies: '@opentelemetry/api': 1.9.0 - '@sveltejs/vite-plugin-svelte-inspector@5.0.0(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@sveltejs/vite-plugin-svelte-inspector@5.0.0(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) debug: 4.4.3 - svelte: 5.41.3 - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + svelte: 5.43.0 + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 5.0.0(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@sveltejs/vite-plugin-svelte-inspector': 5.0.0(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)))(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) debug: 4.4.3 deepmerge: 4.3.1 magic-string: 0.30.21 - svelte: 5.41.3 - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vitefu: 1.1.1(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + svelte: 5.43.0 + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vitefu: 1.1.1(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) transitivePeerDependencies: - supports-color @@ -16020,51 +16018,51 @@ snapshots: - supports-color - typescript - '@swc/core-darwin-arm64@1.13.5': + '@swc/core-darwin-arm64@1.14.0': optional: true - '@swc/core-darwin-x64@1.13.5': + '@swc/core-darwin-x64@1.14.0': optional: true - '@swc/core-linux-arm-gnueabihf@1.13.5': + '@swc/core-linux-arm-gnueabihf@1.14.0': optional: true - '@swc/core-linux-arm64-gnu@1.13.5': + '@swc/core-linux-arm64-gnu@1.14.0': optional: true - '@swc/core-linux-arm64-musl@1.13.5': + '@swc/core-linux-arm64-musl@1.14.0': optional: true - '@swc/core-linux-x64-gnu@1.13.5': + '@swc/core-linux-x64-gnu@1.14.0': optional: true - '@swc/core-linux-x64-musl@1.13.5': + '@swc/core-linux-x64-musl@1.14.0': optional: true - '@swc/core-win32-arm64-msvc@1.13.5': + '@swc/core-win32-arm64-msvc@1.14.0': optional: true - '@swc/core-win32-ia32-msvc@1.13.5': + '@swc/core-win32-ia32-msvc@1.14.0': optional: true - '@swc/core-win32-x64-msvc@1.13.5': + '@swc/core-win32-x64-msvc@1.14.0': optional: true - '@swc/core@1.13.5(@swc/helpers@0.5.17)': + '@swc/core@1.14.0(@swc/helpers@0.5.17)': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.25 optionalDependencies: - '@swc/core-darwin-arm64': 1.13.5 - '@swc/core-darwin-x64': 1.13.5 - '@swc/core-linux-arm-gnueabihf': 1.13.5 - '@swc/core-linux-arm64-gnu': 1.13.5 - '@swc/core-linux-arm64-musl': 1.13.5 - '@swc/core-linux-x64-gnu': 1.13.5 - '@swc/core-linux-x64-musl': 1.13.5 - '@swc/core-win32-arm64-msvc': 1.13.5 - '@swc/core-win32-ia32-msvc': 1.13.5 - '@swc/core-win32-x64-msvc': 1.13.5 + '@swc/core-darwin-arm64': 1.14.0 + '@swc/core-darwin-x64': 1.14.0 + '@swc/core-linux-arm-gnueabihf': 1.14.0 + '@swc/core-linux-arm64-gnu': 1.14.0 + '@swc/core-linux-arm64-musl': 1.14.0 + '@swc/core-linux-x64-gnu': 1.14.0 + '@swc/core-linux-x64-musl': 1.14.0 + '@swc/core-win32-arm64-msvc': 1.14.0 + '@swc/core-win32-ia32-msvc': 1.14.0 + '@swc/core-win32-x64-msvc': 1.14.0 '@swc/helpers': 0.5.17 '@swc/counter@0.1.3': {} @@ -16142,12 +16140,12 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.1.16 '@tailwindcss/oxide-win32-x64-msvc': 4.1.16 - '@tailwindcss/vite@4.1.16(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@tailwindcss/vite@4.1.16(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@tailwindcss/node': 4.1.16 '@tailwindcss/oxide': 4.1.16 tailwindcss: 4.1.16 - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) '@testing-library/dom@10.4.0': dependencies: @@ -16169,13 +16167,13 @@ snapshots: picocolors: 1.1.1 redent: 3.0.0 - '@testing-library/svelte@5.2.8(svelte@5.41.3)(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@testing-library/svelte@5.2.8(svelte@5.43.0)(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@testing-library/dom': 10.4.0 - svelte: 5.41.3 + svelte: 5.43.0 optionalDependencies: - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) '@testing-library/user-event@14.6.1(@testing-library/dom@10.4.0)': dependencies: @@ -16217,7 +16215,7 @@ snapshots: '@types/accepts@1.3.7': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/archiver@6.0.4': dependencies: @@ -16229,16 +16227,16 @@ snapshots: '@types/bcrypt@6.0.0': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/body-parser@1.19.6': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/bonjour@3.5.13': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/braces@3.0.5': {} @@ -16259,21 +16257,21 @@ snapshots: '@types/cli-progress@3.11.6': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/compression@1.8.1': dependencies: '@types/express': 5.0.5 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.1.0 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/connect@3.4.38': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/content-disposition@0.5.9': {} @@ -16290,11 +16288,11 @@ snapshots: '@types/connect': 3.4.38 '@types/express': 5.0.5 '@types/keygrip': 1.0.6 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/cors@2.8.19': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/debug@4.1.12': dependencies: @@ -16304,13 +16302,13 @@ snapshots: '@types/docker-modem@3.0.6': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ssh2': 1.15.5 '@types/dockerode@3.3.45': dependencies: '@types/docker-modem': 3.0.6 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ssh2': 1.15.5 '@types/dom-to-image@2.6.7': {} @@ -16333,14 +16331,14 @@ snapshots: '@types/express-serve-static-core@4.19.7': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/qs': 6.14.0 '@types/range-parser': 1.2.7 '@types/send': 1.2.1 '@types/express-serve-static-core@5.1.0': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/qs': 6.14.0 '@types/range-parser': 1.2.7 '@types/send': 1.2.1 @@ -16366,7 +16364,7 @@ snapshots: '@types/fluent-ffmpeg@2.1.28': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/geojson-vt@3.2.5': dependencies: @@ -16398,7 +16396,7 @@ snapshots: '@types/http-proxy@1.17.17': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/inquirer@8.2.11': dependencies: @@ -16436,7 +16434,7 @@ snapshots: '@types/http-errors': 2.0.5 '@types/keygrip': 1.0.6 '@types/koa-compose': 3.2.8 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/leaflet@1.9.21': dependencies: @@ -16466,7 +16464,7 @@ snapshots: '@types/mock-fs@4.13.4': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ms@2.1.0': {} @@ -16476,7 +16474,7 @@ snapshots: '@types/node-forge@1.3.14': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/node@17.0.45': {} @@ -16488,11 +16486,11 @@ snapshots: dependencies: undici-types: 6.21.0 - '@types/node@22.18.13': + '@types/node@22.19.0': dependencies: undici-types: 6.21.0 - '@types/node@24.9.2': + '@types/node@24.10.0': dependencies: undici-types: 7.16.0 optional: true @@ -16500,7 +16498,7 @@ snapshots: '@types/nodemailer@7.0.3': dependencies: '@aws-sdk/client-sesv2': 3.919.0 - '@types/node': 22.18.13 + '@types/node': 22.19.0 transitivePeerDependencies: - aws-crt @@ -16508,17 +16506,23 @@ snapshots: dependencies: '@types/keygrip': 1.0.6 '@types/koa': 3.0.0 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/parse5@5.0.3': {} '@types/pg-pool@2.0.6': dependencies: - '@types/pg': 8.15.5 + '@types/pg': 8.15.6 '@types/pg@8.15.5': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 + pg-protocol: 1.10.3 + pg-types: 2.2.0 + + '@types/pg@8.15.6': + dependencies: + '@types/node': 22.19.0 pg-protocol: 1.10.3 pg-types: 2.2.0 @@ -16526,13 +16530,13 @@ snapshots: '@types/pngjs@6.0.5': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/prismjs@1.26.5': {} '@types/qrcode@1.5.6': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/qs@6.14.0': {} @@ -16561,7 +16565,7 @@ snapshots: '@types/readdir-glob@1.1.5': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/retry@0.12.2': {} @@ -16571,18 +16575,18 @@ snapshots: '@types/sax@1.2.7': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/semver@7.7.1': {} '@types/send@0.17.6': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/send@1.2.1': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/serve-index@1.9.4': dependencies: @@ -16591,20 +16595,20 @@ snapshots: '@types/serve-static@1.15.10': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/send': 0.17.6 '@types/sockjs@0.3.36': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ssh2-streams@0.1.13': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ssh2@0.5.52': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ssh2-streams': 0.1.13 '@types/ssh2@1.15.5': @@ -16615,7 +16619,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.18.13 + '@types/node': 22.19.0 form-data: 4.0.4 '@types/supercluster@7.1.3': @@ -16629,7 +16633,7 @@ snapshots: '@types/through@0.0.33': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/ua-parser-js@0.7.39': {} @@ -16637,13 +16641,13 @@ snapshots: '@types/unist@3.0.3': {} - '@types/validator@13.15.3': {} + '@types/validator@13.15.4': {} '@types/whatwg-mimetype@3.0.2': {} '@types/ws@8.18.1': dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 '@types/yargs-parser@21.0.3': {} @@ -16651,23 +16655,6 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3))(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/scope-manager': 8.46.2 - '@typescript-eslint/type-utils': 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/utils': 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.46.2 - eslint: 9.38.0(jiti@1.21.7) - graphemer: 1.4.0 - ignore: 7.0.5 - natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3))(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -16685,18 +16672,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.46.2 - '@typescript-eslint/types': 8.46.2 - '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3) - '@typescript-eslint/visitor-keys': 8.46.2 - debug: 4.4.3 - eslint: 9.38.0(jiti@1.21.7) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@typescript-eslint/scope-manager': 8.46.2 @@ -16727,18 +16702,6 @@ snapshots: dependencies: typescript: 5.9.3 - '@typescript-eslint/type-utils@8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@typescript-eslint/types': 8.46.2 - '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3) - '@typescript-eslint/utils': 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - debug: 4.4.3 - eslint: 9.38.0(jiti@1.21.7) - ts-api-utils: 2.1.0(typescript@5.9.3) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@typescript-eslint/types': 8.46.2 @@ -16769,17 +16732,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3)': - dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@1.21.7)) - '@typescript-eslint/scope-manager': 8.46.2 - '@typescript-eslint/types': 8.46.2 - '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3) - eslint: 9.38.0(jiti@1.21.7) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@2.6.1)) @@ -16800,7 +16752,7 @@ snapshots: '@vercel/oidc@3.0.3': {} - '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@1.21.7)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -16815,11 +16767,11 @@ snapshots: std-env: 3.10.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@1.21.7)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 1.0.2 @@ -16834,26 +16786,7 @@ snapshots: std-env: 3.10.0 test-exclude: 7.0.1 tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - - '@vitest/coverage-v8@3.2.4(vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': - dependencies: - '@ampproject/remapping': 2.3.0 - '@bcoe/v8-coverage': 1.0.2 - ast-v8-to-istanbul: 0.3.3 - debug: 4.4.3 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 5.0.6 - istanbul-reports: 3.1.7 - magic-string: 0.30.21 - magicast: 0.3.5 - std-env: 3.10.0 - test-exclude: 7.0.1 - tinyrainbow: 2.0.0 - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color @@ -16865,29 +16798,21 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.4(vite@7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@vitest/mocker@3.2.4(vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - '@vitest/mocker@3.2.4(vite@7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': + '@vitest/mocker@3.2.4(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': dependencies: '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - - '@vitest/mocker@3.2.4(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1))': - dependencies: - '@vitest/spy': 3.2.4 - estree-walker: 3.0.3 - magic-string: 0.30.21 - optionalDependencies: - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) '@vitest/pretty-format@3.2.4': dependencies: @@ -16999,10 +16924,10 @@ snapshots: dependencies: '@namnode/store': 0.1.0 - '@zoom-image/svelte@0.3.7(svelte@5.41.3)': + '@zoom-image/svelte@0.3.7(svelte@5.43.0)': dependencies: '@zoom-image/core': 0.41.3 - svelte: 5.41.3 + svelte: 5.43.0 abab@2.0.6: optional: true @@ -17362,15 +17287,15 @@ snapshots: binary-extensions@2.3.0: {} - bits-ui@2.9.8(@internationalized/date@3.8.2)(svelte@5.41.3): + bits-ui@2.9.8(@internationalized/date@3.8.2)(svelte@5.43.0): dependencies: '@floating-ui/core': 1.7.3 '@floating-ui/dom': 1.7.4 '@internationalized/date': 3.8.2 esm-env: 1.2.2 - runed: 0.29.2(svelte@5.41.3) - svelte: 5.41.3 - svelte-toolbelt: 0.9.3(svelte@5.41.3) + runed: 0.29.2(svelte@5.43.0) + svelte: 5.43.0 + svelte-toolbelt: 0.9.3(svelte@5.43.0) tabbable: 6.3.0 bl@4.1.0: @@ -17481,7 +17406,7 @@ snapshots: builtin-modules@5.0.0: {} - bullmq@5.61.2: + bullmq@5.62.1: dependencies: cron-parser: 4.9.0 ioredis: 5.8.2 @@ -17689,7 +17614,7 @@ snapshots: class-validator@0.14.2: dependencies: - '@types/validator': 13.15.3 + '@types/validator': 13.15.4 libphonenumber-js: 1.12.9 validator: 13.15.15 @@ -18462,7 +18387,7 @@ snapshots: engine.io@6.6.4: dependencies: '@types/cors': 2.8.19 - '@types/node': 22.18.13 + '@types/node': 22.19.0 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.7.2 @@ -18576,34 +18501,34 @@ snapshots: '@esbuild/win32-ia32': 0.19.12 '@esbuild/win32-x64': 0.19.12 - esbuild@0.25.11: + esbuild@0.25.12: optionalDependencies: - '@esbuild/aix-ppc64': 0.25.11 - '@esbuild/android-arm': 0.25.11 - '@esbuild/android-arm64': 0.25.11 - '@esbuild/android-x64': 0.25.11 - '@esbuild/darwin-arm64': 0.25.11 - '@esbuild/darwin-x64': 0.25.11 - '@esbuild/freebsd-arm64': 0.25.11 - '@esbuild/freebsd-x64': 0.25.11 - '@esbuild/linux-arm': 0.25.11 - '@esbuild/linux-arm64': 0.25.11 - '@esbuild/linux-ia32': 0.25.11 - '@esbuild/linux-loong64': 0.25.11 - '@esbuild/linux-mips64el': 0.25.11 - '@esbuild/linux-ppc64': 0.25.11 - '@esbuild/linux-riscv64': 0.25.11 - '@esbuild/linux-s390x': 0.25.11 - '@esbuild/linux-x64': 0.25.11 - '@esbuild/netbsd-arm64': 0.25.11 - '@esbuild/netbsd-x64': 0.25.11 - '@esbuild/openbsd-arm64': 0.25.11 - '@esbuild/openbsd-x64': 0.25.11 - '@esbuild/openharmony-arm64': 0.25.11 - '@esbuild/sunos-x64': 0.25.11 - '@esbuild/win32-arm64': 0.25.11 - '@esbuild/win32-ia32': 0.25.11 - '@esbuild/win32-x64': 0.25.11 + '@esbuild/aix-ppc64': 0.25.12 + '@esbuild/android-arm': 0.25.12 + '@esbuild/android-arm64': 0.25.12 + '@esbuild/android-x64': 0.25.12 + '@esbuild/darwin-arm64': 0.25.12 + '@esbuild/darwin-x64': 0.25.12 + '@esbuild/freebsd-arm64': 0.25.12 + '@esbuild/freebsd-x64': 0.25.12 + '@esbuild/linux-arm': 0.25.12 + '@esbuild/linux-arm64': 0.25.12 + '@esbuild/linux-ia32': 0.25.12 + '@esbuild/linux-loong64': 0.25.12 + '@esbuild/linux-mips64el': 0.25.12 + '@esbuild/linux-ppc64': 0.25.12 + '@esbuild/linux-riscv64': 0.25.12 + '@esbuild/linux-s390x': 0.25.12 + '@esbuild/linux-x64': 0.25.12 + '@esbuild/netbsd-arm64': 0.25.12 + '@esbuild/netbsd-x64': 0.25.12 + '@esbuild/openbsd-arm64': 0.25.12 + '@esbuild/openbsd-x64': 0.25.12 + '@esbuild/openharmony-arm64': 0.25.12 + '@esbuild/sunos-x64': 0.25.12 + '@esbuild/win32-arm64': 0.25.12 + '@esbuild/win32-ia32': 0.25.12 + '@esbuild/win32-x64': 0.25.12 escalade@3.2.0: {} @@ -18626,10 +18551,6 @@ snapshots: source-map: 0.6.1 optional: true - eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@1.21.7)): - dependencies: - eslint: 9.38.0(jiti@1.21.7) - eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@2.6.1)): dependencies: eslint: 9.38.0(jiti@2.6.1) @@ -18646,16 +18567,6 @@ snapshots: lodash.memoize: 4.1.2 semver: 7.7.3 - eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@1.21.7)))(eslint@9.38.0(jiti@1.21.7))(prettier@3.6.2): - dependencies: - eslint: 9.38.0(jiti@1.21.7) - prettier: 3.6.2 - prettier-linter-helpers: 1.0.0 - synckit: 0.11.11 - optionalDependencies: - '@types/eslint': 9.6.1 - eslint-config-prettier: 10.1.8(eslint@9.38.0(jiti@1.21.7)) - eslint-plugin-prettier@5.5.4(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@2.6.1)))(eslint@9.38.0(jiti@2.6.1))(prettier@3.6.2): dependencies: eslint: 9.38.0(jiti@2.6.1) @@ -18666,7 +18577,7 @@ snapshots: '@types/eslint': 9.6.1 eslint-config-prettier: 10.1.8(eslint@9.38.0(jiti@2.6.1)) - eslint-plugin-svelte@3.12.5(eslint@9.38.0(jiti@2.6.1))(svelte@5.41.3): + eslint-plugin-svelte@3.12.5(eslint@9.38.0(jiti@2.6.1))(svelte@5.43.0): dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@2.6.1)) '@jridgewell/sourcemap-codec': 1.5.5 @@ -18678,34 +18589,12 @@ snapshots: postcss-load-config: 3.1.4(postcss@8.5.6) postcss-safe-parser: 7.0.1(postcss@8.5.6) semver: 7.7.3 - svelte-eslint-parser: 1.4.0(svelte@5.41.3) + svelte-eslint-parser: 1.4.0(svelte@5.43.0) optionalDependencies: - svelte: 5.41.3 + svelte: 5.43.0 transitivePeerDependencies: - ts-node - eslint-plugin-unicorn@60.0.0(eslint@9.38.0(jiti@1.21.7)): - dependencies: - '@babel/helper-validator-identifier': 7.28.5 - '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@1.21.7)) - '@eslint/plugin-kit': 0.3.5 - change-case: 5.4.4 - ci-info: 4.3.0 - clean-regexp: 1.0.0 - core-js-compat: 3.46.0 - eslint: 9.38.0(jiti@1.21.7) - esquery: 1.6.0 - find-up-simple: 1.0.1 - globals: 16.4.0 - indent-string: 5.0.0 - is-builtin-module: 5.0.0 - jsesc: 3.1.0 - pluralize: 8.0.0 - regexp-tree: 0.1.27 - regjsparser: 0.12.0 - semver: 7.7.3 - strip-indent: 4.0.0 - eslint-plugin-unicorn@60.0.0(eslint@9.38.0(jiti@2.6.1)): dependencies: '@babel/helper-validator-identifier': 7.28.5 @@ -18764,47 +18653,6 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.38.0(jiti@1.21.7): - dependencies: - '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@1.21.7)) - '@eslint-community/regexpp': 4.12.2 - '@eslint/config-array': 0.21.1 - '@eslint/config-helpers': 0.4.1 - '@eslint/core': 0.16.0 - '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.38.0 - '@eslint/plugin-kit': 0.4.0 - '@humanfs/node': 0.16.7 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.3 - '@types/estree': 1.0.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.6 - debug: 4.4.3 - escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - optionalDependencies: - jiti: 1.21.7 - transitivePeerDependencies: - - supports-color - eslint@9.38.0(jiti@2.6.1): dependencies: '@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@2.6.1)) @@ -18928,7 +18776,7 @@ snapshots: eval@0.1.8: dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 require-like: 0.1.2 event-emitter@0.3.5: @@ -18962,21 +18810,21 @@ snapshots: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - exiftool-vendored.exe@13.38.0: + exiftool-vendored.exe@13.41.0: optional: true - exiftool-vendored.pl@13.38.0: {} + exiftool-vendored.pl@13.41.0: {} - exiftool-vendored@31.1.0: + exiftool-vendored@31.3.0: dependencies: - '@photostructure/tz-lookup': 11.2.1 + '@photostructure/tz-lookup': 11.3.0 '@types/luxon': 3.7.1 batch-cluster: 15.0.1 - exiftool-vendored.pl: 13.38.0 + exiftool-vendored.pl: 13.41.0 he: 1.2.0 luxon: 3.7.2 optionalDependencies: - exiftool-vendored.exe: 13.38.0 + exiftool-vendored.exe: 13.41.0 expect-type@1.2.1: {} @@ -19224,7 +19072,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@9.1.0(typescript@5.8.3)(webpack@5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17))): + fork-ts-checker-webpack-plugin@9.1.0(typescript@5.8.3)(webpack@5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17))): dependencies: '@babel/code-frame': 7.27.1 chalk: 4.1.2 @@ -19239,7 +19087,7 @@ snapshots: semver: 7.7.3 tapable: 2.3.0 typescript: 5.8.3 - webpack: 5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17)) + webpack: 5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17)) form-data-encoder@2.1.4: {} @@ -19488,7 +19336,7 @@ snapshots: optionalDependencies: uglify-js: 3.19.3 - happy-dom@20.0.8: + happy-dom@20.0.10: dependencies: '@types/node': 20.19.24 '@types/whatwg-mimetype': 3.0.2 @@ -19917,9 +19765,9 @@ snapshots: inline-style-parser@0.2.4: {} - inquirer@8.2.7(@types/node@22.18.13): + inquirer@8.2.7(@types/node@22.19.0): dependencies: - '@inquirer/external-editor': 1.0.2(@types/node@22.18.13) + '@inquirer/external-editor': 1.0.2(@types/node@22.19.0) ansi-escapes: 4.3.2 chalk: 4.1.2 cli-cursor: 3.1.0 @@ -20133,7 +19981,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.18.13 + '@types/node': 22.19.0 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -20141,13 +19989,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -20599,7 +20447,7 @@ snapshots: tinyqueue: 2.0.3 vt-pbf: 3.1.3 - maplibre-gl@5.9.0: + maplibre-gl@5.10.0: dependencies: '@mapbox/geojson-rewind': 0.5.2 '@mapbox/jsonlint-lines-primitives': 2.0.2 @@ -20608,7 +20456,7 @@ snapshots: '@mapbox/unitbezier': 0.0.1 '@mapbox/vector-tile': 2.0.4 '@mapbox/whoots-js': 3.1.0 - '@maplibre/maplibre-gl-style-spec': 24.3.0 + '@maplibre/maplibre-gl-style-spec': 24.3.1 '@maplibre/vt-pbf': 4.0.3 '@types/geojson': 7946.0.16 '@types/geojson-vt': 3.2.5 @@ -21367,39 +21215,39 @@ snapshots: neo-async@2.6.2: {} - nest-commander@3.20.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(@types/inquirer@8.2.11)(@types/node@22.18.13)(typescript@5.9.3): + nest-commander@3.20.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(@types/inquirer@8.2.11)(@types/node@22.19.0)(typescript@5.9.3): dependencies: '@fig/complete-commander': 3.2.0(commander@11.1.0) - '@golevelup/nestjs-discovery': 5.0.0(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7) - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@golevelup/nestjs-discovery': 5.0.0(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@types/inquirer': 8.2.11 commander: 11.1.0 cosmiconfig: 8.3.6(typescript@5.9.3) - inquirer: 8.2.7(@types/node@22.18.13) + inquirer: 8.2.7(@types/node@22.19.0) transitivePeerDependencies: - '@types/node' - typescript - nestjs-cls@5.4.3(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2): + nestjs-cls@5.4.3(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2): dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) reflect-metadata: 0.2.2 rxjs: 7.8.2 - nestjs-kysely@3.1.2(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7)(kysely@0.28.2)(reflect-metadata@0.2.2): + nestjs-kysely@3.1.2(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8)(kysely@0.28.2)(reflect-metadata@0.2.2): dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) kysely: 0.28.2 reflect-metadata: 0.2.2 tslib: 2.8.1 - nestjs-otel@7.0.1(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.7): + nestjs-otel@7.0.1(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.8): dependencies: - '@nestjs/common': 11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) - '@nestjs/core': 11.1.7(@nestjs/common@11.1.7(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.7)(@nestjs/websockets@11.1.7)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/common': 11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.8(@nestjs/common@11.1.8(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/platform-express@11.1.8)(@nestjs/websockets@11.1.8)(reflect-metadata@0.2.2)(rxjs@7.8.2) '@opentelemetry/api': 1.9.0 '@opentelemetry/host-metrics': 0.36.0(@opentelemetry/api@1.9.0) response-time: 2.3.4 @@ -22392,10 +22240,10 @@ snapshots: dependencies: prettier: 3.6.2 - prettier-plugin-svelte@3.4.0(prettier@3.6.2)(svelte@5.41.3): + prettier-plugin-svelte@3.4.0(prettier@3.6.2)(svelte@5.43.0): dependencies: prettier: 3.6.2 - svelte: 5.41.3 + svelte: 5.43.0 prettier@3.6.2: {} @@ -22474,7 +22322,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.18.13 + '@types/node': 22.19.0 long: 5.3.2 protocol-buffers-schema@3.6.0: {} @@ -22582,14 +22430,14 @@ snapshots: react: 19.2.0 scheduler: 0.27.0 - react-email@4.3.1: + react-email@4.3.2: dependencies: '@babel/parser': 7.28.5 '@babel/traverse': 7.28.5 chokidar: 4.0.3 commander: 13.1.0 debounce: 2.2.0 - esbuild: 0.25.11 + esbuild: 0.25.12 glob: 11.0.3 jiti: 2.4.2 log-symbols: 7.0.1 @@ -23005,10 +22853,10 @@ snapshots: dependencies: queue-microtask: 1.2.3 - runed@0.29.2(svelte@5.41.3): + runed@0.29.2(svelte@5.43.0): dependencies: esm-env: 1.2.2 - svelte: 5.41.3 + svelte: 5.43.0 rw@1.3.3: {} @@ -23292,7 +23140,7 @@ snapshots: simple-concat: 1.0.1 optional: true - simple-icons@15.17.0: {} + simple-icons@15.18.0: {} sirv@2.0.4: dependencies: @@ -23624,19 +23472,19 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte-check@4.3.3(picomatch@4.0.3)(svelte@5.41.3)(typescript@5.9.3): + svelte-check@4.3.3(picomatch@4.0.3)(svelte@5.43.0)(typescript@5.9.3): dependencies: '@jridgewell/trace-mapping': 0.3.31 chokidar: 4.0.3 fdir: 6.5.0(picomatch@4.0.3) picocolors: 1.1.1 sade: 1.8.1 - svelte: 5.41.3 + svelte: 5.43.0 typescript: 5.9.3 transitivePeerDependencies: - picomatch - svelte-eslint-parser@1.4.0(svelte@5.41.3): + svelte-eslint-parser@1.4.0(svelte@5.43.0): dependencies: eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -23645,7 +23493,7 @@ snapshots: postcss-scss: 4.0.9(postcss@8.5.6) postcss-selector-parser: 7.1.0 optionalDependencies: - svelte: 5.41.3 + svelte: 5.43.0 svelte-gestures@5.2.2: {} @@ -23653,7 +23501,7 @@ snapshots: dependencies: highlight.js: 11.11.1 - svelte-i18n@4.0.1(svelte@5.41.3): + svelte-i18n@4.0.1(svelte@5.43.0): dependencies: cli-color: 2.0.4 deepmerge: 4.3.1 @@ -23661,34 +23509,34 @@ snapshots: estree-walker: 2.0.2 intl-messageformat: 10.7.18 sade: 1.8.1 - svelte: 5.41.3 + svelte: 5.43.0 tiny-glob: 0.2.9 - svelte-maplibre@1.2.3(svelte@5.41.3): + svelte-maplibre@1.2.5(svelte@5.43.0): dependencies: d3-geo: 3.1.1 dequal: 2.0.3 just-compare: 2.3.0 - maplibre-gl: 5.9.0 + maplibre-gl: 5.10.0 pmtiles: 3.2.1 - svelte: 5.41.3 + svelte: 5.43.0 - svelte-parse-markup@0.1.5(svelte@5.41.3): + svelte-parse-markup@0.1.5(svelte@5.43.0): dependencies: - svelte: 5.41.3 + svelte: 5.43.0 - svelte-persisted-store@0.12.0(svelte@5.41.3): + svelte-persisted-store@0.12.0(svelte@5.43.0): dependencies: - svelte: 5.41.3 + svelte: 5.43.0 - svelte-toolbelt@0.9.3(svelte@5.41.3): + svelte-toolbelt@0.9.3(svelte@5.43.0): dependencies: clsx: 2.1.1 - runed: 0.29.2(svelte@5.41.3) + runed: 0.29.2(svelte@5.43.0) style-to-object: 1.0.11 - svelte: 5.41.3 + svelte: 5.43.0 - svelte@5.41.3: + svelte@5.43.0: dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.5.5 @@ -23845,16 +23693,16 @@ snapshots: minizlib: 3.1.0 yallist: 5.0.0 - terser-webpack-plugin@5.3.14(@swc/core@1.13.5(@swc/helpers@0.5.17))(webpack@5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17))): + terser-webpack-plugin@5.3.14(@swc/core@1.14.0(@swc/helpers@0.5.17))(webpack@5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17))): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.3.3 serialize-javascript: 6.0.2 terser: 5.44.0 - webpack: 5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17)) + webpack: 5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17)) optionalDependencies: - '@swc/core': 1.13.5(@swc/helpers@0.5.17) + '@swc/core': 1.14.0(@swc/helpers@0.5.17) terser-webpack-plugin@5.3.14(webpack@5.102.1): dependencies: @@ -24091,17 +23939,6 @@ snapshots: typedarray@0.0.6: {} - typescript-eslint@8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3))(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/parser': 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - '@typescript-eslint/typescript-estree': 8.46.2(typescript@5.9.3) - '@typescript-eslint/utils': 8.46.2(eslint@9.38.0(jiti@1.21.7))(typescript@5.9.3) - eslint: 9.38.0(jiti@1.21.7) - typescript: 5.9.3 - transitivePeerDependencies: - - supports-color - typescript-eslint@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3): dependencies: '@typescript-eslint/eslint-plugin': 8.46.2(@typescript-eslint/parser@8.46.2(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3))(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.3) @@ -24245,10 +24082,10 @@ snapshots: unpipe@1.0.0: {} - unplugin-swc@1.5.8(@swc/core@1.13.5(@swc/helpers@0.5.17))(rollup@4.52.5): + unplugin-swc@1.5.8(@swc/core@1.14.0(@swc/helpers@0.5.17))(rollup@4.52.5): dependencies: '@rollup/pluginutils': 5.3.0(rollup@4.52.5) - '@swc/core': 1.13.5(@swc/helpers@0.5.17) + '@swc/core': 1.14.0(@swc/helpers@0.5.17) load-tsconfig: 0.2.5 unplugin: 2.3.10 transitivePeerDependencies: @@ -24380,13 +24217,13 @@ snapshots: - rollup - supports-color - vite-node@3.2.4(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): + vite-node@3.2.4(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -24401,13 +24238,13 @@ snapshots: - tsx - yaml - vite-node@3.2.4(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): + vite-node@3.2.4(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: cac: 6.7.14 debug: 4.4.3 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) transitivePeerDependencies: - '@types/node' - jiti @@ -24422,110 +24259,62 @@ snapshots: - tsx - yaml - vite-node@3.2.4(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): - dependencies: - cac: 6.7.14 - debug: 4.4.3 - es-module-lexer: 1.7.0 - pathe: 2.0.3 - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): + vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): dependencies: debug: 4.4.3 globrex: 0.1.2 tsconfck: 3.1.6(typescript@5.9.3) optionalDependencies: - vite: 7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) transitivePeerDependencies: - supports-color - typescript - vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): + vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: - debug: 4.4.3 - globrex: 0.1.2 - tsconfck: 3.1.6(typescript@5.9.3) - optionalDependencies: - vite: 7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - transitivePeerDependencies: - - supports-color - - typescript - - vite@7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): - dependencies: - esbuild: 0.25.11 + esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.52.5 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 22.18.13 - fsevents: 2.3.3 - jiti: 1.21.7 - lightningcss: 1.30.2 - terser: 5.44.0 - yaml: 2.8.1 - - vite@7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): - dependencies: - esbuild: 0.25.11 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.52.5 - tinyglobby: 0.2.15 - optionalDependencies: - '@types/node': 22.18.13 + '@types/node': 22.19.0 fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 terser: 5.44.0 yaml: 2.8.1 - vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): + vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: - esbuild: 0.25.11 + esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) picomatch: 4.0.3 postcss: 8.5.6 rollup: 4.52.5 tinyglobby: 0.2.15 optionalDependencies: - '@types/node': 24.9.2 + '@types/node': 24.10.0 fsevents: 2.3.3 jiti: 2.6.1 lightningcss: 1.30.2 terser: 5.44.0 yaml: 2.8.1 - vitefu@1.1.1(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): + vitefu@1.1.1(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): optionalDependencies: - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vitest-fetch-mock@0.4.5(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): + vitest-fetch-mock@0.4.5(vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)): dependencies: - vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vitest: 3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@1.21.7)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2(encoding@0.1.13)))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -24543,57 +24332,13 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.12(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@22.18.13)(jiti@1.21.7)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 - '@types/node': 22.18.13 - happy-dom: 20.0.8 - jsdom: 26.1.0(canvas@2.11.2) - transitivePeerDependencies: - - jiti - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2(encoding@0.1.13)))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): - dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) - '@vitest/pretty-format': 3.2.4 - '@vitest/runner': 3.2.4 - '@vitest/snapshot': 3.2.4 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.2.0 - debug: 4.4.3 - expect-type: 1.2.1 - magic-string: 0.30.21 - pathe: 2.0.3 - picomatch: 4.0.3 - std-env: 3.10.0 - tinybench: 2.9.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.15 - tinypool: 1.1.1 - tinyrainbow: 2.0.0 - vite: 7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/debug': 4.1.12 - '@types/node': 22.18.13 - happy-dom: 20.0.8 + '@types/node': 22.19.0 + happy-dom: 20.0.10 jsdom: 26.1.0(canvas@2.11.2(encoding@0.1.13)) transitivePeerDependencies: - jiti @@ -24609,11 +24354,11 @@ snapshots: - tsx - yaml - vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.18.13)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@22.19.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -24631,13 +24376,13 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.12(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@22.18.13)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@22.19.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 - '@types/node': 22.18.13 - happy-dom: 20.0.8 + '@types/node': 22.19.0 + happy-dom: 20.0.10 jsdom: 26.1.0(canvas@2.11.2) transitivePeerDependencies: - jiti @@ -24653,11 +24398,11 @@ snapshots: - tsx - yaml - vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.9.2)(happy-dom@20.0.8)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): + vitest@3.2.4(@types/debug@4.1.12)(@types/node@24.10.0)(happy-dom@20.0.10)(jiti@2.6.1)(jsdom@26.1.0(canvas@2.11.2))(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1): dependencies: '@types/chai': 5.2.2 '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) + '@vitest/mocker': 3.2.4(vite@7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1)) '@vitest/pretty-format': 3.2.4 '@vitest/runner': 3.2.4 '@vitest/snapshot': 3.2.4 @@ -24675,13 +24420,13 @@ snapshots: tinyglobby: 0.2.15 tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 7.1.12(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) - vite-node: 3.2.4(@types/node@24.9.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite: 7.1.12(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) + vite-node: 3.2.4(@types/node@24.10.0)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(yaml@2.8.1) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 - '@types/node': 24.9.2 - happy-dom: 20.0.8 + '@types/node': 24.10.0 + happy-dom: 20.0.10 jsdom: 26.1.0(canvas@2.11.2) transitivePeerDependencies: - jiti @@ -24820,7 +24565,7 @@ snapshots: webpack-virtual-modules@0.6.2: {} - webpack@5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17)): + webpack@5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17)): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.8 @@ -24844,7 +24589,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 4.3.3 tapable: 2.3.0 - terser-webpack-plugin: 5.3.14(@swc/core@1.13.5(@swc/helpers@0.5.17))(webpack@5.100.2(@swc/core@1.13.5(@swc/helpers@0.5.17))) + terser-webpack-plugin: 5.3.14(@swc/core@1.14.0(@swc/helpers@0.5.17))(webpack@5.100.2(@swc/core@1.14.0(@swc/helpers@0.5.17))) watchpack: 2.4.4 webpack-sources: 3.3.3 transitivePeerDependencies: diff --git a/readme_i18n/README_ru_RU.md b/readme_i18n/README_ru_RU.md index e29adde9c1..9c60e5f772 100644 --- a/readme_i18n/README_ru_RU.md +++ b/readme_i18n/README_ru_RU.md @@ -94,7 +94,7 @@ | LivePhoto/MotionPhoto Đ˛ĐžŅĐŋŅ€ĐžĐ¸ĐˇĐ˛ĐĩĐ´ĐĩĐŊиĐĩ и ĐąĐĩĐēаĐŋ | Да | Да | | ĐžŅ‚ĐžĐąŅ€Đ°ĐļĐĩĐŊиĐĩ 360° Đ¸ĐˇĐžĐąŅ€Đ°ĐļĐĩĐŊиК | НĐĩŅ‚ | Да | | ĐĐ°ŅŅ‚Ņ€Đ°Đ¸Đ˛Đ°ĐĩĐŧĐ°Ņ ŅŅ‚Ņ€ŅƒĐēŅ‚ŅƒŅ€Đ° Ņ…Ņ€Đ°ĐŊиĐģĐ¸Ņ‰Đ° | Да | Да | -| ĐžĐąŅ‰Đ¸Đš Đ´ĐžŅŅ‚ŅƒĐŋ Đē ĐēĐžĐŊŅ‚ĐĩĐŊŅ‚Ņƒ | НĐĩŅ‚ | Да | +| ĐžĐąŅ‰Đ¸Đš Đ´ĐžŅŅ‚ŅƒĐŋ Đē ĐēĐžĐŊŅ‚ĐĩĐŊŅ‚Ņƒ | Да | Да | | ĐŅ€Ņ…Đ¸Đ˛ и Đ¸ĐˇĐąŅ€Đ°ĐŊĐŊĐžĐĩ | Да | Да | | ĐœĐ¸Ņ€ĐžĐ˛Đ°Ņ ĐēĐ°Ņ€Ņ‚Đ° | Да | Да | | ХОвĐŧĐĩҁ҂ĐŊĐžĐĩ Đ¸ŅĐŋĐžĐģŅŒĐˇĐžĐ˛Đ°ĐŊиĐĩ | Да | Да | @@ -104,7 +104,7 @@ | ГаĐģĐĩŅ€Đĩи Ņ‚ĐžĐģҌĐēĐž Đ´ĐģŅ ĐŋŅ€ĐžŅĐŧĐžŅ‚Ņ€Đ° | Да | Да | | КоĐģĐģаĐļи | Да | Да | | МĐĩŅ‚Đēи (Ņ‚ĐĩĐŗĐ¸) | НĐĩŅ‚ | Да | -| ĐŸŅ€ĐžŅĐŧĐžŅ‚Ņ€ ĐŋаĐŋĐēОК | НĐĩŅ‚ | Да | +| ĐŸŅ€ĐžŅĐŧĐžŅ‚Ņ€ ĐŋаĐŋĐēОК | Да | Да | ## ПĐĩŅ€ĐĩвОд diff --git a/renovate.json b/renovate.json index 3a889f4789..fbbc8976bd 100644 --- a/renovate.json +++ b/renovate.json @@ -26,6 +26,12 @@ "matchPackageNames": ["ghcr.io/immich-app/postgres"], "matchUpdateTypes": ["major"], "enabled": false + }, + { + "matchPackageNames": ["ruby"], + "groupName": "ruby", + "matchCurrentVersion": "< 3.4", + "enabled": false } ], "ignorePaths": [ diff --git a/server/Dockerfile b/server/Dockerfile index 54077d80ce..0fc4126926 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/immich-app/base-server-dev:202510281104@sha256:e2f94c2e92cbae5982b014e610ff29731c0fbcb4bf69022c7fe27594e40c9f83 AS builder +FROM ghcr.io/immich-app/base-server-dev:202511041104@sha256:7558931a4a71989e7fd9fa3e1ba6c28da15891867310edda8c58236171839f2f AS builder ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ CI=1 \ COREPACK_HOME=/tmp \ @@ -48,7 +48,7 @@ RUN --mount=type=cache,id=pnpm-cli,target=/buildcache/pnpm-store \ pnpm --filter @immich/sdk --filter @immich/cli build && \ pnpm --filter @immich/cli --prod --no-optional deploy /output/cli-pruned -FROM ghcr.io/immich-app/base-server-prod:202510281104@sha256:84f8f3eb4cfafc5e624235f7db703e1222fd60831bef1d488d8d8cad2be5023d +FROM ghcr.io/immich-app/base-server-prod:202511041104@sha256:57c0379977fd5521d83cdf661aecd1497c83a9a661ebafe0a5243a09fc1064cb WORKDIR /usr/src/app ENV NODE_ENV=production \ diff --git a/server/Dockerfile.dev b/server/Dockerfile.dev index 93a4f197ea..133b8a835d 100644 --- a/server/Dockerfile.dev +++ b/server/Dockerfile.dev @@ -1,5 +1,5 @@ # dev build -FROM ghcr.io/immich-app/base-server-dev:202510281104@sha256:e2f94c2e92cbae5982b014e610ff29731c0fbcb4bf69022c7fe27594e40c9f83 AS dev +FROM ghcr.io/immich-app/base-server-dev:202511041104@sha256:7558931a4a71989e7fd9fa3e1ba6c28da15891867310edda8c58236171839f2f AS dev ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ CI=1 \ diff --git a/server/mise.toml b/server/mise.toml new file mode 100644 index 0000000000..d2240c4289 --- /dev/null +++ b/server/mise.toml @@ -0,0 +1,66 @@ +[tasks.install] +run = "pnpm install --filter immich --frozen-lockfile" + +[tasks.build] +env._.path = "./node_modules/.bin" +run = "nest build" + +[tasks.test] +env._.path = "./node_modules/.bin" +run = "vitest --config test/vitest.config.mjs" + +[tasks."test-medium"] +env._.path = "./node_modules/.bin" +run = "vitest --config test/vitest.config.medium.mjs" + +[tasks.format] +env._.path = "./node_modules/.bin" +run = "prettier --check ." + +[tasks."format-fix"] +env._.path = "./node_modules/.bin" +run = "prettier --write ." + +[tasks.lint] +env._.path = "./node_modules/.bin" +run = "eslint \"src/**/*.ts\" \"test/**/*.ts\" --max-warnings 0" + +[tasks."lint-fix"] +run = { task = "lint --fix" } + +[tasks.check] +env._.path = "./node_modules/.bin" +run = "tsc --noEmit" + +[tasks.sql] +run = "node ./dist/bin/sync-open-api.js" + +[tasks."open-api"] +run = "node ./dist/bin/sync-open-api.js" + +[tasks.migrations] +run = "node ./dist/bin/migrations.js" +description = "Run database migration commands (create, generate, run, debug, or query)" + +[tasks."schema-drop"] +run = { task = "migrations query 'DROP schema public cascade; CREATE schema public;'" } + +[tasks."schema-reset"] +run = [ + { task = ":schema-drop" }, + { task = "migrations run" }, +] + +[tasks."email-dev"] +env._.path = "./node_modules/.bin" +run = "email dev -p 3050 --dir src/emails" + +[tasks.checklist] +run = [ + { task = ":install" }, + { task = ":format" }, + { task = ":lint" }, + { task = ":check" }, + { task = ":test-medium --run" }, + { task = ":test --run" }, +] diff --git a/server/package.json b/server/package.json index 8ac59bc792..b497a392cb 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "immich", - "version": "2.2.0", + "version": "2.2.3", "description": "", "author": "", "private": true, @@ -130,7 +130,7 @@ "@types/luxon": "^3.6.2", "@types/mock-fs": "^4.13.1", "@types/multer": "^2.0.0", - "@types/node": "^22.18.12", + "@types/node": "^22.19.0", "@types/nodemailer": "^7.0.0", "@types/picomatch": "^4.0.0", "@types/pngjs": "^6.0.5", diff --git a/server/src/constants.ts b/server/src/constants.ts index 3b75ca9f7e..1a14bdbcc3 100644 --- a/server/src/constants.ts +++ b/server/src/constants.ts @@ -2,7 +2,7 @@ import { Duration } from 'luxon'; import { readFileSync } from 'node:fs'; import { dirname, join } from 'node:path'; import { SemVer } from 'semver'; -import { DatabaseExtension, ExifOrientation, VectorIndex } from 'src/enum'; +import { ApiTag, DatabaseExtension, ExifOrientation, VectorIndex } from 'src/enum'; export const POSTGRES_VERSION_RANGE = '>=14.0.0'; export const VECTORCHORD_VERSION_RANGE = '>=0.3 <0.6'; @@ -138,3 +138,56 @@ export const ORIENTATION_TO_SHARP_ROTATION: Record = { + [ApiTag.Activities]: 'An activity is a like or a comment made by a user on an asset or album.', + [ApiTag.Albums]: 'An album is a collection of assets that can be shared with other users or via shared links.', + [ApiTag.ApiKeys]: 'An api key can be used to programmatically access the Immich API.', + [ApiTag.Assets]: 'An asset is an image or video that has been uploaded to Immich.', + [ApiTag.Authentication]: 'Endpoints related to user authentication, including OAuth.', + [ApiTag.AuthenticationAdmin]: 'Administrative endpoints related to authentication.', + [ApiTag.Deprecated]: 'Deprecated endpoints that are planned for removal in the next major release.', + [ApiTag.Download]: 'Endpoints for downloading assets or collections of assets.', + [ApiTag.Duplicates]: 'Endpoints for managing and identifying duplicate assets.', + [ApiTag.Faces]: + 'A face is a detected human face within an asset, which can be associated with a person. Faces are normally detected via machine learning, but can also be created via manually.', + [ApiTag.Jobs]: + 'Queues and background jobs are used for processing tasks asynchronously. Queues can be paused and resumed as needed.', + [ApiTag.Libraries]: + 'An external library is made up of input file paths or expressions that are scanned for asset files. Discovered files are automatically imported. Assets much be unique within a library, but can be duplicated across libraries. Each user has a default upload library, and can have one or more external libraries.', + [ApiTag.Map]: + 'Map endpoints include supplemental functionality related to geolocation, such as reverse geocoding and retrieving map markers for assets with geolocation data.', + [ApiTag.Memories]: + 'A memory is a specialized collection of assets with dedicated viewing implementations in the web and mobile clients. A memory includes fields related to visibility and are automatically generated per user via a background job.', + [ApiTag.Notifications]: + 'A notification is a specialized message sent to users to inform them of important events. Currently, these notifications are only shown in the Immich web application.', + [ApiTag.NotificationsAdmin]: 'Notification administrative endpoints.', + [ApiTag.Partners]: 'A partner is a link with another user that allows sharing of assets between two users.', + [ApiTag.People]: + 'A person is a collection of faces, which can be favorited and named. A person can also be merged into another person. People are automatically created via the face recognition job.', + [ApiTag.Search]: + 'Endpoints related to searching assets via text, smart search, optical character recognition (OCR), and other filters like person, album, and other metadata. Search endpoints usually support pagination and sorting.', + [ApiTag.Server]: + 'Information about the current server deployment, including version and build information, available features, supported media types, and more.', + [ApiTag.Sessions]: + 'A session represents an authenticated login session for a user. Sessions also appear in the web application as "Authorized devices".', + [ApiTag.SharedLinks]: + 'A shared link is a public url that provides access to a specific album, asset, or collection of assets. A shared link can be protected with a password, include a specific slug, allow or disallow downloads, and optionally include an expiration date.', + [ApiTag.Stacks]: + 'A stack is a group of related assets. One asset is the "primary" asset, and the rest are "child" assets. On the main timeline, stack parents are included by default, while child assets are hidden.', + [ApiTag.Sync]: 'A collection of endpoints for the new mobile synchronization implementation.', + [ApiTag.SystemConfig]: 'Endpoints to view, modify, and validate the system configuration settings.', + [ApiTag.SystemMetadata]: + 'Endpoints to view, modify, and validate the system metadata, which includes information about things like admin onboarding status.', + [ApiTag.Tags]: + 'A tag is a user-defined label that can be applied to assets for organizational purposes. Tags can also be hierarchical, allowing for parent-child relationships between tags.', + [ApiTag.Timeline]: + 'Specialized endpoints related to the timeline implementation used in the web application. External applications or tools should not use or rely on these endpoints, as they are subject to change without notice.', + [ApiTag.Trash]: + 'Endpoints for managing the trash can, which includes assets that have been discarded. Items in the trash are automatically deleted after a configured amount of time.', + [ApiTag.UsersAdmin]: + 'Administrative endpoints for managing users, including creating, updating, deleting, and restoring users. Also includes endpoints for resetting passwords and PIN codes.', + [ApiTag.Users]: + 'Endpoints for viewing and updating the current users, including product key information, profile picture data, onboarding progress, and more.', + [ApiTag.Views]: 'Endpoints for specialized views, such as the folder view.', +}; diff --git a/server/src/controllers/activity.controller.ts b/server/src/controllers/activity.controller.ts index 75b2e2f8a3..e0c71a00e6 100644 --- a/server/src/controllers/activity.controller.ts +++ b/server/src/controllers/activity.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Query, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Response } from 'express'; import { ActivityCreateDto, @@ -9,24 +9,33 @@ import { ActivityStatisticsResponseDto, } from 'src/dtos/activity.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { ActivityService } from 'src/services/activity.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Activities') +@ApiTags(ApiTag.Activities) @Controller('activities') export class ActivityController { constructor(private service: ActivityService) {} @Get() @Authenticated({ permission: Permission.ActivityRead }) + @ApiOperation({ + summary: 'List all activities', + description: + 'Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.', + }) getActivities(@Auth() auth: AuthDto, @Query() dto: ActivitySearchDto): Promise { return this.service.getAll(auth, dto); } @Post() @Authenticated({ permission: Permission.ActivityCreate }) + @ApiOperation({ + summary: 'Create an activity', + description: 'Create a like or a comment for an album, or an asset in an album.', + }) async createActivity( @Auth() auth: AuthDto, @Body() dto: ActivityCreateDto, @@ -41,6 +50,10 @@ export class ActivityController { @Get('statistics') @Authenticated({ permission: Permission.ActivityStatistics }) + @ApiOperation({ + summary: 'Retrieve activity statistics', + description: 'Returns the number of likes and comments for a given album or asset in an album.', + }) getActivityStatistics(@Auth() auth: AuthDto, @Query() dto: ActivityDto): Promise { return this.service.getStatistics(auth, dto); } @@ -48,6 +61,10 @@ export class ActivityController { @Delete(':id') @Authenticated({ permission: Permission.ActivityDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete an activity', + description: 'Removes a like or comment from a given album or asset in an album.', + }) deleteActivity(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/album.controller.ts b/server/src/controllers/album.controller.ts index 47f8b5603a..671aa55004 100644 --- a/server/src/controllers/album.controller.ts +++ b/server/src/controllers/album.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Patch, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AddUsersDto, AlbumInfoDto, @@ -14,36 +14,52 @@ import { } from 'src/dtos/album.dto'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { AlbumService } from 'src/services/album.service'; import { ParseMeUUIDPipe, UUIDParamDto } from 'src/validation'; -@ApiTags('Albums') +@ApiTags(ApiTag.Albums) @Controller('albums') export class AlbumController { constructor(private service: AlbumService) {} @Get() @Authenticated({ permission: Permission.AlbumRead }) + @ApiOperation({ + summary: 'List all albums', + description: 'Retrieve a list of albums available to the authenticated user.', + }) getAllAlbums(@Auth() auth: AuthDto, @Query() query: GetAlbumsDto): Promise { return this.service.getAll(auth, query); } @Post() @Authenticated({ permission: Permission.AlbumCreate }) + @ApiOperation({ + summary: 'Create an album', + description: 'Create a new album. The album can also be created with initial users and assets.', + }) createAlbum(@Auth() auth: AuthDto, @Body() dto: CreateAlbumDto): Promise { return this.service.create(auth, dto); } @Get('statistics') @Authenticated({ permission: Permission.AlbumStatistics }) + @ApiOperation({ + summary: 'Retrieve album statistics', + description: 'Returns statistics about the albums available to the authenticated user.', + }) getAlbumStatistics(@Auth() auth: AuthDto): Promise { return this.service.getStatistics(auth); } @Authenticated({ permission: Permission.AlbumRead, sharedLink: true }) @Get(':id') + @ApiOperation({ + summary: 'Retrieve an album', + description: 'Retrieve information about a specific album by its ID.', + }) getAlbumInfo( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -54,6 +70,11 @@ export class AlbumController { @Patch(':id') @Authenticated({ permission: Permission.AlbumUpdate }) + @ApiOperation({ + summary: 'Update an album', + description: + 'Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.', + }) updateAlbumInfo( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -65,12 +86,21 @@ export class AlbumController { @Delete(':id') @Authenticated({ permission: Permission.AlbumDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete an album', + description: + 'Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.', + }) deleteAlbum(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto) { return this.service.delete(auth, id); } @Put(':id/assets') @Authenticated({ permission: Permission.AlbumAssetCreate, sharedLink: true }) + @ApiOperation({ + summary: 'Add assets to an album', + description: 'Add multiple assets to a specific album by its ID.', + }) addAssetsToAlbum( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -81,12 +111,20 @@ export class AlbumController { @Put('assets') @Authenticated({ permission: Permission.AlbumAssetCreate, sharedLink: true }) + @ApiOperation({ + summary: 'Add assets to albums', + description: 'Send a list of asset IDs and album IDs to add each asset to each album.', + }) addAssetsToAlbums(@Auth() auth: AuthDto, @Body() dto: AlbumsAddAssetsDto): Promise { return this.service.addAssetsToAlbums(auth, dto); } @Delete(':id/assets') @Authenticated({ permission: Permission.AlbumAssetDelete }) + @ApiOperation({ + summary: 'Remove assets from an album', + description: 'Remove multiple assets from a specific album by its ID.', + }) removeAssetFromAlbum( @Auth() auth: AuthDto, @Body() dto: BulkIdsDto, @@ -97,6 +135,10 @@ export class AlbumController { @Put(':id/users') @Authenticated({ permission: Permission.AlbumUserCreate }) + @ApiOperation({ + summary: 'Share album with users', + description: 'Share an album with multiple users. Each user can be given a specific role in the album.', + }) addUsersToAlbum( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -108,6 +150,10 @@ export class AlbumController { @Put(':id/user/:userId') @Authenticated({ permission: Permission.AlbumUserUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update user role', + description: 'Change the role for a specific user in a specific album.', + }) updateAlbumUser( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -120,6 +166,10 @@ export class AlbumController { @Delete(':id/user/:userId') @Authenticated({ permission: Permission.AlbumUserDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Remove user from album', + description: 'Remove a user from an album. Use an ID of "me" to leave a shared album.', + }) removeUserFromAlbum( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, diff --git a/server/src/controllers/api-key.controller.ts b/server/src/controllers/api-key.controller.ts index 59b6908128..8a4e01e36a 100644 --- a/server/src/controllers/api-key.controller.ts +++ b/server/src/controllers/api-key.controller.ts @@ -1,43 +1,60 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { APIKeyCreateDto, APIKeyCreateResponseDto, APIKeyResponseDto, APIKeyUpdateDto } from 'src/dtos/api-key.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { ApiKeyService } from 'src/services/api-key.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('API Keys') +@ApiTags(ApiTag.ApiKeys) @Controller('api-keys') export class ApiKeyController { constructor(private service: ApiKeyService) {} @Post() @Authenticated({ permission: Permission.ApiKeyCreate }) + @ApiOperation({ + summary: 'Create an API key', + description: 'Creates a new API key. It will be limited to the permissions specified.', + }) createApiKey(@Auth() auth: AuthDto, @Body() dto: APIKeyCreateDto): Promise { return this.service.create(auth, dto); } @Get() @Authenticated({ permission: Permission.ApiKeyRead }) + @ApiOperation({ summary: 'List all API keys', description: 'Retrieve all API keys of the current user.' }) getApiKeys(@Auth() auth: AuthDto): Promise { return this.service.getAll(auth); } @Get('me') @Authenticated({ permission: false }) + @ApiOperation({ + summary: 'Retrieve the current API key', + description: 'Retrieve the API key that is used to access this endpoint.', + }) async getMyApiKey(@Auth() auth: AuthDto): Promise { return this.service.getMine(auth); } @Get(':id') @Authenticated({ permission: Permission.ApiKeyRead }) + @ApiOperation({ + summary: 'Retrieve an API key', + description: 'Retrieve an API key by its ID. The current user must own this API key.', + }) getApiKey(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getById(auth, id); } @Put(':id') @Authenticated({ permission: Permission.ApiKeyUpdate }) + @ApiOperation({ + summary: 'Update an API key', + description: 'Updates the name and permissions of an API key by its ID. The current user must own this API key.', + }) updateApiKey( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -49,6 +66,10 @@ export class ApiKeyController { @Delete(':id') @Authenticated({ permission: Permission.ApiKeyDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete an API key', + description: 'Deletes an API key identified by its ID. The current user must own this API key.', + }) deleteApiKey(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/asset-media.controller.ts b/server/src/controllers/asset-media.controller.ts index 688e513b64..6f110b33ba 100644 --- a/server/src/controllers/asset-media.controller.ts +++ b/server/src/controllers/asset-media.controller.ts @@ -34,7 +34,7 @@ import { UploadFieldName, } from 'src/dtos/asset-media.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { ImmichHeader, Permission, RouteKey } from 'src/enum'; +import { ApiTag, ImmichHeader, Permission, RouteKey } from 'src/enum'; import { AssetUploadInterceptor } from 'src/middleware/asset-upload.interceptor'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { FileUploadInterceptor, getFiles } from 'src/middleware/file-upload.interceptor'; @@ -44,7 +44,7 @@ import { UploadFiles } from 'src/types'; import { ImmichFileResponse, sendFile } from 'src/utils/file'; import { FileNotEmptyValidator, UUIDParamDto } from 'src/validation'; -@ApiTags('Assets') +@ApiTags(ApiTag.Assets) @Controller(RouteKey.Asset) export class AssetMediaController { constructor( @@ -53,6 +53,7 @@ export class AssetMediaController { ) {} @Post() + @Authenticated({ permission: Permission.AssetUpload, sharedLink: true }) @UseInterceptors(AssetUploadInterceptor, FileUploadInterceptor) @ApiConsumes('multipart/form-data') @ApiHeader({ @@ -61,7 +62,10 @@ export class AssetMediaController { required: false, }) @ApiBody({ description: 'Asset Upload Information', type: AssetMediaCreateDto }) - @Authenticated({ permission: Permission.AssetUpload, sharedLink: true }) + @ApiOperation({ + summary: 'Upload asset', + description: 'Uploads a new asset to the server.', + }) async uploadAsset( @Auth() auth: AuthDto, @UploadedFiles(new ParseFilePipe({ validators: [new FileNotEmptyValidator(['assetData'])] })) files: UploadFiles, @@ -81,6 +85,10 @@ export class AssetMediaController { @Get(':id/original') @FileResponse() @Authenticated({ permission: Permission.AssetDownload, sharedLink: true }) + @ApiOperation({ + summary: 'Download original asset', + description: 'Downloads the original file of the specified asset.', + }) async downloadAsset( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -90,17 +98,14 @@ export class AssetMediaController { await sendFile(res, next, () => this.service.downloadOriginal(auth, id), this.logger); } - /** - * Replace the asset with new file, without changing its id - */ @Put(':id/original') @UseInterceptors(FileUploadInterceptor) @ApiConsumes('multipart/form-data') @EndpointLifecycle({ addedAt: 'v1.106.0', deprecatedAt: 'v1.142.0', - summary: 'replaceAsset', - description: 'Replace the asset with new file, without changing its id', + summary: 'Replace asset', + description: 'Replace the asset with new file, without changing its id.', }) @Authenticated({ permission: Permission.AssetReplace, sharedLink: true }) async replaceAsset( @@ -122,6 +127,10 @@ export class AssetMediaController { @Get(':id/thumbnail') @FileResponse() @Authenticated({ permission: Permission.AssetView, sharedLink: true }) + @ApiOperation({ + summary: 'View asset thumbnail', + description: 'Retrieve the thumbnail image for the specified asset.', + }) async viewAsset( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -159,6 +168,10 @@ export class AssetMediaController { @Get(':id/video/playback') @FileResponse() @Authenticated({ permission: Permission.AssetView, sharedLink: true }) + @ApiOperation({ + summary: 'Play asset video', + description: 'Streams the video file for the specified asset. This endpoint also supports byte range requests.', + }) async playAssetVideo( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -174,7 +187,7 @@ export class AssetMediaController { @Post('exist') @Authenticated() @ApiOperation({ - summary: 'checkExistingAssets', + summary: 'Check existing assets', description: 'Checks if multiple assets exist on the server and returns all existing - used by background backup', }) @HttpCode(HttpStatus.OK) @@ -191,8 +204,8 @@ export class AssetMediaController { @Post('bulk-upload-check') @Authenticated({ permission: Permission.AssetUpload }) @ApiOperation({ - summary: 'checkBulkUpload', - description: 'Checks if assets exist by checksums', + summary: 'Check bulk upload', + description: 'Determine which assets have already been uploaded to the server based on their SHA1 checksums.', }) @HttpCode(HttpStatus.OK) checkBulkUpload( diff --git a/server/src/controllers/asset.controller.ts b/server/src/controllers/asset.controller.ts index a6f8c7921d..6a7309b6d6 100644 --- a/server/src/controllers/asset.controller.ts +++ b/server/src/controllers/asset.controller.ts @@ -18,29 +18,31 @@ import { } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { AssetOcrResponseDto } from 'src/dtos/ocr.dto'; -import { Permission, RouteKey } from 'src/enum'; +import { ApiTag, Permission, RouteKey } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { AssetService } from 'src/services/asset.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Assets') +@ApiTags(ApiTag.Assets) @Controller(RouteKey.Asset) export class AssetController { constructor(private service: AssetService) {} @Get('random') @Authenticated({ permission: Permission.AssetRead }) - @EndpointLifecycle({ deprecatedAt: 'v1.116.0' }) + @EndpointLifecycle({ + deprecatedAt: 'v1.116.0', + summary: 'Get random assets', + description: 'Retrieve a specified number of random assets for the authenticated user.', + }) getRandom(@Auth() auth: AuthDto, @Query() dto: RandomAssetsDto): Promise { return this.service.getRandom(auth, dto.count ?? 1); } - /** - * Get all asset of a device that are in the database, ID only. - */ @Get('/device/:deviceId') - @ApiOperation({ - summary: 'getAllUserAssetsByDeviceId', + @EndpointLifecycle({ + deprecatedAt: 'v2.0.0', + summary: 'Retrieve assets by device ID', description: 'Get all asset of a device that are in the database, ID only.', }) @Authenticated() @@ -50,6 +52,10 @@ export class AssetController { @Get('statistics') @Authenticated({ permission: Permission.AssetStatistics }) + @ApiOperation({ + summary: 'Get asset statistics', + description: 'Retrieve various statistics about the assets owned by the authenticated user.', + }) getAssetStatistics(@Auth() auth: AuthDto, @Query() dto: AssetStatsDto): Promise { return this.service.getStatistics(auth, dto); } @@ -57,6 +63,10 @@ export class AssetController { @Post('jobs') @Authenticated() @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Run an asset job', + description: 'Run a specific job on a set of assets.', + }) runAssetJobs(@Auth() auth: AuthDto, @Body() dto: AssetJobsDto): Promise { return this.service.run(auth, dto); } @@ -64,6 +74,10 @@ export class AssetController { @Put() @Authenticated({ permission: Permission.AssetUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update assets', + description: 'Updates multiple assets at the same time.', + }) updateAssets(@Auth() auth: AuthDto, @Body() dto: AssetBulkUpdateDto): Promise { return this.service.updateAll(auth, dto); } @@ -71,12 +85,20 @@ export class AssetController { @Delete() @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete assets', + description: 'Deletes multiple assets at the same time.', + }) deleteAssets(@Auth() auth: AuthDto, @Body() dto: AssetBulkDeleteDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) + @ApiOperation({ + summary: 'Retrieve an asset', + description: 'Retrieve detailed information about a specific asset.', + }) getAssetInfo(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id) as Promise; } @@ -84,12 +106,20 @@ export class AssetController { @Put('copy') @Authenticated({ permission: Permission.AssetCopy }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Copy asset', + description: 'Copy asset information like albums, tags, etc. from one asset to another.', + }) copyAsset(@Auth() auth: AuthDto, @Body() dto: AssetCopyDto): Promise { return this.service.copy(auth, dto); } @Put(':id') @Authenticated({ permission: Permission.AssetUpdate }) + @ApiOperation({ + summary: 'Update an asset', + description: 'Update information of a specific asset.', + }) updateAsset( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -100,18 +130,30 @@ export class AssetController { @Get(':id/metadata') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Get asset metadata', + description: 'Retrieve all metadata key-value pairs associated with the specified asset.', + }) getAssetMetadata(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getMetadata(auth, id); } @Get(':id/ocr') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve asset OCR data', + description: 'Retrieve all OCR (Optical Character Recognition) data associated with the specified asset.', + }) getAssetOcr(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getOcr(auth, id); } @Put(':id/metadata') @Authenticated({ permission: Permission.AssetUpdate }) + @ApiOperation({ + summary: 'Update asset metadata', + description: 'Update or add metadata key-value pairs for the specified asset.', + }) updateAssetMetadata( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -122,6 +164,10 @@ export class AssetController { @Get(':id/metadata/:key') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve asset metadata by key', + description: 'Retrieve the value of a specific metadata key associated with the specified asset.', + }) getAssetMetadataByKey( @Auth() auth: AuthDto, @Param() { id, key }: AssetMetadataRouteParams, @@ -132,6 +178,10 @@ export class AssetController { @Delete(':id/metadata/:key') @Authenticated({ permission: Permission.AssetUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete asset metadata by key', + description: 'Delete a specific metadata key-value pair associated with the specified asset.', + }) deleteAssetMetadata(@Auth() auth: AuthDto, @Param() { id, key }: AssetMetadataRouteParams): Promise { return this.service.deleteMetadataByKey(auth, id, key); } diff --git a/server/src/controllers/auth-admin.controller.ts b/server/src/controllers/auth-admin.controller.ts index dba352783e..8cbdf5d6da 100644 --- a/server/src/controllers/auth-admin.controller.ts +++ b/server/src/controllers/auth-admin.controller.ts @@ -1,17 +1,21 @@ import { Controller, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { AuthAdminService } from 'src/services/auth-admin.service'; -@ApiTags('Auth (admin)') +@ApiTags(ApiTag.AuthenticationAdmin) @Controller('admin/auth') export class AuthAdminController { constructor(private service: AuthAdminService) {} @Post('unlink-all') @Authenticated({ permission: Permission.AdminAuthUnlinkAll, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Unlink all OAuth accounts', + description: 'Unlinks all OAuth accounts associated with user accounts in the system.', + }) unlinkAllOAuthAccountsAdmin(@Auth() auth: AuthDto): Promise { return this.service.unlinkAll(auth); } diff --git a/server/src/controllers/auth.controller.ts b/server/src/controllers/auth.controller.ts index 636e3a3047..7f76ff1952 100644 --- a/server/src/controllers/auth.controller.ts +++ b/server/src/controllers/auth.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Post, Put, Req, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { AuthDto, @@ -16,17 +16,21 @@ import { ValidateAccessTokenResponseDto, } from 'src/dtos/auth.dto'; import { UserAdminResponseDto } from 'src/dtos/user.dto'; -import { AuthType, ImmichCookie, Permission } from 'src/enum'; +import { ApiTag, AuthType, ImmichCookie, Permission } from 'src/enum'; import { Auth, Authenticated, GetLoginDetails } from 'src/middleware/auth.guard'; import { AuthService, LoginDetails } from 'src/services/auth.service'; import { respondWithCookie, respondWithoutCookie } from 'src/utils/response'; -@ApiTags('Authentication') +@ApiTags(ApiTag.Authentication) @Controller('auth') export class AuthController { constructor(private service: AuthService) {} @Post('login') + @ApiOperation({ + summary: 'Login', + description: 'Login with username and password and receive a session token.', + }) async login( @Res({ passthrough: true }) res: Response, @Body() loginCredential: LoginCredentialDto, @@ -44,11 +48,19 @@ export class AuthController { } @Post('admin-sign-up') + @ApiOperation({ + summary: 'Register admin', + description: 'Create the first admin user in the system.', + }) signUpAdmin(@Body() dto: SignUpDto): Promise { return this.service.adminSignUp(dto); } @Post('validateToken') + @ApiOperation({ + summary: 'Validate access token', + description: 'Validate the current authorization method is still valid.', + }) @Authenticated({ permission: false }) @HttpCode(HttpStatus.OK) validateAccessToken(): ValidateAccessTokenResponseDto { @@ -58,6 +70,10 @@ export class AuthController { @Post('change-password') @Authenticated({ permission: Permission.AuthChangePassword }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Change password', + description: 'Change the password of the current user.', + }) changePassword(@Auth() auth: AuthDto, @Body() dto: ChangePasswordDto): Promise { return this.service.changePassword(auth, dto); } @@ -65,6 +81,10 @@ export class AuthController { @Post('logout') @Authenticated() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Logout', + description: 'Logout the current user and invalidate the session token.', + }) async logout( @Req() request: Request, @Res({ passthrough: true }) res: Response, @@ -82,6 +102,11 @@ export class AuthController { @Get('status') @Authenticated() + @ApiOperation({ + summary: 'Retrieve auth status', + description: + 'Get information about the current session, including whether the user has a password, and if the session can access locked assets.', + }) getAuthStatus(@Auth() auth: AuthDto): Promise { return this.service.getAuthStatus(auth); } @@ -89,6 +114,10 @@ export class AuthController { @Post('pin-code') @Authenticated({ permission: Permission.PinCodeCreate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Setup pin code', + description: 'Setup a new pin code for the current user.', + }) setupPinCode(@Auth() auth: AuthDto, @Body() dto: PinCodeSetupDto): Promise { return this.service.setupPinCode(auth, dto); } @@ -96,6 +125,10 @@ export class AuthController { @Put('pin-code') @Authenticated({ permission: Permission.PinCodeUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Change pin code', + description: 'Change the pin code for the current user.', + }) async changePinCode(@Auth() auth: AuthDto, @Body() dto: PinCodeChangeDto): Promise { return this.service.changePinCode(auth, dto); } @@ -103,6 +136,10 @@ export class AuthController { @Delete('pin-code') @Authenticated({ permission: Permission.PinCodeDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Reset pin code', + description: 'Reset the pin code for the current user by providing the account password', + }) async resetPinCode(@Auth() auth: AuthDto, @Body() dto: PinCodeResetDto): Promise { return this.service.resetPinCode(auth, dto); } @@ -110,12 +147,20 @@ export class AuthController { @Post('session/unlock') @Authenticated() @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Unlock auth session', + description: 'Temporarily grant the session elevated access to locked assets by providing the correct PIN code.', + }) async unlockAuthSession(@Auth() auth: AuthDto, @Body() dto: SessionUnlockDto): Promise { return this.service.unlockSession(auth, dto); } @Post('session/lock') @Authenticated() + @ApiOperation({ + summary: 'Lock auth session', + description: 'Remove elevated access to locked assets from the current session.', + }) @HttpCode(HttpStatus.NO_CONTENT) async lockAuthSession(@Auth() auth: AuthDto): Promise { return this.service.lockSession(auth); diff --git a/server/src/controllers/download.controller.ts b/server/src/controllers/download.controller.ts index a7c2af78ed..26288412d7 100644 --- a/server/src/controllers/download.controller.ts +++ b/server/src/controllers/download.controller.ts @@ -1,20 +1,25 @@ import { Body, Controller, HttpCode, HttpStatus, Post, StreamableFile } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetIdsDto } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { DownloadInfoDto, DownloadResponseDto } from 'src/dtos/download.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { DownloadService } from 'src/services/download.service'; import { asStreamableFile } from 'src/utils/file'; -@ApiTags('Download') +@ApiTags(ApiTag.Download) @Controller('download') export class DownloadController { constructor(private service: DownloadService) {} @Post('info') @Authenticated({ permission: Permission.AssetDownload, sharedLink: true }) + @ApiOperation({ + summary: 'Retrieve download information', + description: + 'Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.', + }) getDownloadInfo(@Auth() auth: AuthDto, @Body() dto: DownloadInfoDto): Promise { return this.service.getDownloadInfo(auth, dto); } @@ -23,6 +28,11 @@ export class DownloadController { @Authenticated({ permission: Permission.AssetDownload, sharedLink: true }) @FileResponse() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Download asset archive', + description: + 'Download a ZIP archive containing the specified assets. The assets must have been previously requested via the "getDownloadInfo" endpoint.', + }) downloadArchive(@Auth() auth: AuthDto, @Body() dto: AssetIdsDto): Promise { return this.service.downloadArchive(auth, dto).then(asStreamableFile); } diff --git a/server/src/controllers/duplicate.controller.ts b/server/src/controllers/duplicate.controller.ts index 9cf5ae97a6..5fddef9dd0 100644 --- a/server/src/controllers/duplicate.controller.ts +++ b/server/src/controllers/duplicate.controller.ts @@ -1,20 +1,24 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { DuplicateResponseDto } from 'src/dtos/duplicate.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { DuplicateService } from 'src/services/duplicate.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Duplicates') +@ApiTags(ApiTag.Duplicates) @Controller('duplicates') export class DuplicateController { constructor(private service: DuplicateService) {} @Get() @Authenticated({ permission: Permission.DuplicateRead }) + @ApiOperation({ + summary: 'Retrieve duplicates', + description: 'Retrieve a list of duplicate assets available to the authenticated user.', + }) getAssetDuplicates(@Auth() auth: AuthDto): Promise { return this.service.getDuplicates(auth); } @@ -22,6 +26,10 @@ export class DuplicateController { @Delete() @Authenticated({ permission: Permission.DuplicateDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete duplicates', + description: 'Delete multiple duplicate assets specified by their IDs.', + }) deleteDuplicates(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.deleteAll(auth, dto); } @@ -29,6 +37,10 @@ export class DuplicateController { @Delete(':id') @Authenticated({ permission: Permission.DuplicateDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a duplicate', + description: 'Delete a single duplicate asset specified by its ID.', + }) deleteDuplicate(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/face.controller.ts b/server/src/controllers/face.controller.ts index 564b217c16..cc7f23929a 100644 --- a/server/src/controllers/face.controller.ts +++ b/server/src/controllers/face.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { AssetFaceCreateDto, @@ -8,30 +8,43 @@ import { FaceDto, PersonResponseDto, } from 'src/dtos/person.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { PersonService } from 'src/services/person.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Faces') +@ApiTags(ApiTag.Faces) @Controller('faces') export class FaceController { constructor(private service: PersonService) {} @Post() @Authenticated({ permission: Permission.FaceCreate }) + @ApiOperation({ + summary: 'Create a face', + description: + 'Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.', + }) createFace(@Auth() auth: AuthDto, @Body() dto: AssetFaceCreateDto) { return this.service.createFace(auth, dto); } @Get() @Authenticated({ permission: Permission.FaceRead }) + @ApiOperation({ + summary: 'Retrieve faces for asset', + description: 'Retrieve all faces belonging to an asset.', + }) getFaces(@Auth() auth: AuthDto, @Query() dto: FaceDto): Promise { return this.service.getFacesById(auth, dto); } @Put(':id') @Authenticated({ permission: Permission.FaceUpdate }) + @ApiOperation({ + summary: 'Re-assign a face to another person', + description: 'Re-assign the face provided in the body to the person identified by the id in the path parameter.', + }) reassignFacesById( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -43,6 +56,10 @@ export class FaceController { @Delete(':id') @Authenticated({ permission: Permission.FaceDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a face', + description: 'Delete a face identified by the id. Optionally can be force deleted.', + }) deleteFace(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @Body() dto: AssetFaceDeleteDto): Promise { return this.service.deleteFace(auth, id, dto); } diff --git a/server/src/controllers/job.controller.ts b/server/src/controllers/job.controller.ts index 9c4e819649..b34f5ffecf 100644 --- a/server/src/controllers/job.controller.ts +++ b/server/src/controllers/job.controller.ts @@ -1,17 +1,21 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AllJobStatusResponseDto, JobCommandDto, JobCreateDto, JobIdParamDto, JobStatusDto } from 'src/dtos/job.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { JobService } from 'src/services/job.service'; -@ApiTags('Jobs') +@ApiTags(ApiTag.Jobs) @Controller('jobs') export class JobController { constructor(private service: JobService) {} @Get() @Authenticated({ permission: Permission.JobRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve queue counts and status', + description: 'Retrieve the counts of the current queue, as well as the current status.', + }) getAllJobsStatus(): Promise { return this.service.getAllJobsStatus(); } @@ -19,12 +23,22 @@ export class JobController { @Post() @Authenticated({ permission: Permission.JobCreate, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Create a manual job', + description: + 'Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.', + }) createJob(@Body() dto: JobCreateDto): Promise { return this.service.create(dto); } @Put(':id') @Authenticated({ permission: Permission.JobCreate, admin: true }) + @ApiOperation({ + summary: 'Run jobs', + description: + 'Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.', + }) sendJobCommand(@Param() { id }: JobIdParamDto, @Body() dto: JobCommandDto): Promise { return this.service.handleCommand(id, dto); } diff --git a/server/src/controllers/library.controller.ts b/server/src/controllers/library.controller.ts index b37bc40ce7..8b527eb4bb 100644 --- a/server/src/controllers/library.controller.ts +++ b/server/src/controllers/library.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { CreateLibraryDto, LibraryResponseDto, @@ -8,36 +8,52 @@ import { ValidateLibraryDto, ValidateLibraryResponseDto, } from 'src/dtos/library.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { LibraryService } from 'src/services/library.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Libraries') +@ApiTags(ApiTag.Libraries) @Controller('libraries') export class LibraryController { constructor(private service: LibraryService) {} @Get() @Authenticated({ permission: Permission.LibraryRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve libraries', + description: 'Retrieve a list of external libraries.', + }) getAllLibraries(): Promise { return this.service.getAll(); } @Post() @Authenticated({ permission: Permission.LibraryCreate, admin: true }) + @ApiOperation({ + summary: 'Create a library', + description: 'Create a new external library.', + }) createLibrary(@Body() dto: CreateLibraryDto): Promise { return this.service.create(dto); } @Get(':id') @Authenticated({ permission: Permission.LibraryRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve a library', + description: 'Retrieve an external library by its ID.', + }) getLibrary(@Param() { id }: UUIDParamDto): Promise { return this.service.get(id); } @Put(':id') @Authenticated({ permission: Permission.LibraryUpdate, admin: true }) + @ApiOperation({ + summary: 'Update a library', + description: 'Update an existing external library.', + }) updateLibrary(@Param() { id }: UUIDParamDto, @Body() dto: UpdateLibraryDto): Promise { return this.service.update(id, dto); } @@ -45,6 +61,10 @@ export class LibraryController { @Delete(':id') @Authenticated({ permission: Permission.LibraryDelete, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a library', + description: 'Delete an external library by its ID.', + }) deleteLibrary(@Param() { id }: UUIDParamDto): Promise { return this.service.delete(id); } @@ -52,6 +72,10 @@ export class LibraryController { @Post(':id/validate') @Authenticated({ admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Validate library settings', + description: 'Validate the settings of an external library.', + }) // TODO: change endpoint to validate current settings instead validate(@Param() { id }: UUIDParamDto, @Body() dto: ValidateLibraryDto): Promise { return this.service.validate(id, dto); @@ -59,6 +83,11 @@ export class LibraryController { @Get(':id/statistics') @Authenticated({ permission: Permission.LibraryStatistics, admin: true }) + @ApiOperation({ + summary: 'Retrieve library statistics', + description: + 'Retrieve statistics for a specific external library, including number of videos, images, and storage usage.', + }) getLibraryStatistics(@Param() { id }: UUIDParamDto): Promise { return this.service.getStatistics(id); } @@ -66,6 +95,10 @@ export class LibraryController { @Post(':id/scan') @Authenticated({ permission: Permission.LibraryUpdate, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Scan a library', + description: 'Queue a scan for the external library to find and import new assets.', + }) scanLibrary(@Param() { id }: UUIDParamDto): Promise { return this.service.queueScan(id); } diff --git a/server/src/controllers/map.controller.ts b/server/src/controllers/map.controller.ts index 88104e6b58..41acfbd5b4 100644 --- a/server/src/controllers/map.controller.ts +++ b/server/src/controllers/map.controller.ts @@ -1,5 +1,5 @@ import { Controller, Get, HttpCode, HttpStatus, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { MapMarkerDto, @@ -7,16 +7,21 @@ import { MapReverseGeocodeDto, MapReverseGeocodeResponseDto, } from 'src/dtos/map.dto'; +import { ApiTag } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { MapService } from 'src/services/map.service'; -@ApiTags('Map') +@ApiTags(ApiTag.Map) @Controller('map') export class MapController { constructor(private service: MapService) {} @Get('markers') @Authenticated() + @ApiOperation({ + summary: 'Retrieve map markers', + description: 'Retrieve a list of latitude and longitude coordinates for every asset with location data.', + }) getMapMarkers(@Auth() auth: AuthDto, @Query() options: MapMarkerDto): Promise { return this.service.getMapMarkers(auth, options); } @@ -24,6 +29,10 @@ export class MapController { @Authenticated() @Get('reverse-geocode') @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Reverse geocode coordinates', + description: 'Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.', + }) reverseGeocode(@Query() dto: MapReverseGeocodeDto): Promise { return this.service.reverseGeocode(dto); } diff --git a/server/src/controllers/memory.controller.ts b/server/src/controllers/memory.controller.ts index 3b5ad2bb4e..d433ae88ed 100644 --- a/server/src/controllers/memory.controller.ts +++ b/server/src/controllers/memory.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { @@ -9,42 +9,64 @@ import { MemoryStatisticsResponseDto, MemoryUpdateDto, } from 'src/dtos/memory.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { MemoryService } from 'src/services/memory.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Memories') +@ApiTags(ApiTag.Memories) @Controller('memories') export class MemoryController { constructor(private service: MemoryService) {} @Get() @Authenticated({ permission: Permission.MemoryRead }) + @ApiOperation({ + summary: 'Retrieve memories', + description: + 'Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.', + }) searchMemories(@Auth() auth: AuthDto, @Query() dto: MemorySearchDto): Promise { return this.service.search(auth, dto); } @Post() @Authenticated({ permission: Permission.MemoryCreate }) + @ApiOperation({ + summary: 'Create a memory', + description: + 'Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.', + }) createMemory(@Auth() auth: AuthDto, @Body() dto: MemoryCreateDto): Promise { return this.service.create(auth, dto); } @Get('statistics') @Authenticated({ permission: Permission.MemoryStatistics }) + @ApiOperation({ + summary: 'Retrieve memories statistics', + description: 'Retrieve statistics about memories, such as total count and other relevant metrics.', + }) memoriesStatistics(@Auth() auth: AuthDto, @Query() dto: MemorySearchDto): Promise { return this.service.statistics(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.MemoryRead }) + @ApiOperation({ + summary: 'Retrieve a memory', + description: 'Retrieve a specific memory by its ID.', + }) getMemory(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.MemoryUpdate }) + @ApiOperation({ + summary: 'Update a memory', + description: 'Update an existing memory by its ID.', + }) updateMemory( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -56,12 +78,20 @@ export class MemoryController { @Delete(':id') @Authenticated({ permission: Permission.MemoryDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a memory', + description: 'Delete a specific memory by its ID.', + }) deleteMemory(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } @Put(':id/assets') @Authenticated({ permission: Permission.MemoryAssetCreate }) + @ApiOperation({ + summary: 'Add assets to a memory', + description: 'Add a list of asset IDs to a specific memory.', + }) addMemoryAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -73,6 +103,10 @@ export class MemoryController { @Delete(':id/assets') @Authenticated({ permission: Permission.MemoryAssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Remove assets from a memory', + description: 'Remove a list of asset IDs from a specific memory.', + }) removeMemoryAssets( @Auth() auth: AuthDto, @Body() dto: BulkIdsDto, diff --git a/server/src/controllers/notification-admin.controller.ts b/server/src/controllers/notification-admin.controller.ts index 28ca7bfd30..fe7d9d1e49 100644 --- a/server/src/controllers/notification-admin.controller.ts +++ b/server/src/controllers/notification-admin.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, HttpCode, HttpStatus, Param, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { NotificationCreateDto, @@ -9,17 +9,22 @@ import { TestEmailResponseDto, } from 'src/dtos/notification.dto'; import { SystemConfigSmtpDto } from 'src/dtos/system-config.dto'; +import { ApiTag } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { EmailTemplate } from 'src/repositories/email.repository'; import { NotificationAdminService } from 'src/services/notification-admin.service'; -@ApiTags('Notifications (Admin)') +@ApiTags(ApiTag.NotificationsAdmin) @Controller('admin/notifications') export class NotificationAdminController { constructor(private service: NotificationAdminService) {} @Post() @Authenticated({ admin: true }) + @ApiOperation({ + summary: 'Create a notification', + description: 'Create a new notification for a specific user.', + }) createNotification(@Auth() auth: AuthDto, @Body() dto: NotificationCreateDto): Promise { return this.service.create(auth, dto); } @@ -27,6 +32,10 @@ export class NotificationAdminController { @Post('test-email') @Authenticated({ admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Send test email', + description: 'Send a test email using the provided SMTP configuration.', + }) sendTestEmailAdmin(@Auth() auth: AuthDto, @Body() dto: SystemConfigSmtpDto): Promise { return this.service.sendTestEmail(auth.user.id, dto); } @@ -34,6 +43,10 @@ export class NotificationAdminController { @Post('templates/:name') @Authenticated({ admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Render email template', + description: 'Retrieve a preview of the provided email template.', + }) getNotificationTemplateAdmin( @Auth() auth: AuthDto, @Param('name') name: EmailTemplate, diff --git a/server/src/controllers/notification.controller.ts b/server/src/controllers/notification.controller.ts index 8ce183c5d0..7d4840dd0b 100644 --- a/server/src/controllers/notification.controller.ts +++ b/server/src/controllers/notification.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { NotificationDeleteAllDto, @@ -8,18 +8,22 @@ import { NotificationUpdateAllDto, NotificationUpdateDto, } from 'src/dtos/notification.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { NotificationService } from 'src/services/notification.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Notifications') +@ApiTags(ApiTag.Notifications) @Controller('notifications') export class NotificationController { constructor(private service: NotificationService) {} @Get() @Authenticated({ permission: Permission.NotificationRead }) + @ApiOperation({ + summary: 'Retrieve notifications', + description: 'Retrieve a list of notifications.', + }) getNotifications(@Auth() auth: AuthDto, @Query() dto: NotificationSearchDto): Promise { return this.service.search(auth, dto); } @@ -27,6 +31,10 @@ export class NotificationController { @Put() @Authenticated({ permission: Permission.NotificationUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update notifications', + description: 'Update a list of notifications. Allows to bulk-set the read status of notifications.', + }) updateNotifications(@Auth() auth: AuthDto, @Body() dto: NotificationUpdateAllDto): Promise { return this.service.updateAll(auth, dto); } @@ -34,18 +42,30 @@ export class NotificationController { @Delete() @Authenticated({ permission: Permission.NotificationDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete notifications', + description: 'Delete a list of notifications at once.', + }) deleteNotifications(@Auth() auth: AuthDto, @Body() dto: NotificationDeleteAllDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.NotificationRead }) + @ApiOperation({ + summary: 'Get a notification', + description: 'Retrieve a specific notification identified by id.', + }) getNotification(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.NotificationUpdate }) + @ApiOperation({ + summary: 'Update a notification', + description: 'Update a specific notification to set its read status.', + }) updateNotification( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -57,6 +77,10 @@ export class NotificationController { @Delete(':id') @Authenticated({ permission: Permission.NotificationDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a notification', + description: 'Delete a specific notification.', + }) deleteNotification(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } diff --git a/server/src/controllers/oauth.controller.ts b/server/src/controllers/oauth.controller.ts index f81a184557..cd15486d56 100644 --- a/server/src/controllers/oauth.controller.ts +++ b/server/src/controllers/oauth.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Post, Redirect, Req, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { AuthDto, @@ -9,18 +9,23 @@ import { OAuthConfigDto, } from 'src/dtos/auth.dto'; import { UserAdminResponseDto } from 'src/dtos/user.dto'; -import { AuthType, ImmichCookie } from 'src/enum'; +import { ApiTag, AuthType, ImmichCookie } from 'src/enum'; import { Auth, Authenticated, GetLoginDetails } from 'src/middleware/auth.guard'; import { AuthService, LoginDetails } from 'src/services/auth.service'; import { respondWithCookie } from 'src/utils/response'; -@ApiTags('OAuth') +@ApiTags(ApiTag.Authentication) @Controller('oauth') export class OAuthController { constructor(private service: AuthService) {} @Get('mobile-redirect') @Redirect() + @ApiOperation({ + summary: 'Redirect OAuth to mobile', + description: + 'Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.', + }) redirectOAuthToMobile(@Req() request: Request) { return { url: this.service.getMobileRedirect(request.url), @@ -29,6 +34,10 @@ export class OAuthController { } @Post('authorize') + @ApiOperation({ + summary: 'Start OAuth', + description: 'Initiate the OAuth authorization process.', + }) async startOAuth( @Body() dto: OAuthConfigDto, @Res({ passthrough: true }) res: Response, @@ -49,6 +58,10 @@ export class OAuthController { } @Post('callback') + @ApiOperation({ + summary: 'Finish OAuth', + description: 'Complete the OAuth authorization process by exchanging the authorization code for a session token.', + }) async finishOAuth( @Req() request: Request, @Res({ passthrough: true }) res: Response, @@ -71,6 +84,10 @@ export class OAuthController { @Post('link') @Authenticated() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Link OAuth account', + description: 'Link an OAuth account to the authenticated user.', + }) linkOAuthAccount( @Req() request: Request, @Auth() auth: AuthDto, @@ -82,6 +99,10 @@ export class OAuthController { @Post('unlink') @Authenticated() @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Unlink OAuth account', + description: 'Unlink the OAuth account from the authenticated user.', + }) unlinkOAuthAccount(@Auth() auth: AuthDto): Promise { return this.service.unlink(auth); } diff --git a/server/src/controllers/partner.controller.ts b/server/src/controllers/partner.controller.ts index 7cb5c1c274..63ad84002f 100644 --- a/server/src/controllers/partner.controller.ts +++ b/server/src/controllers/partner.controller.ts @@ -1,32 +1,44 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { EndpointLifecycle } from 'src/decorators'; import { AuthDto } from 'src/dtos/auth.dto'; import { PartnerCreateDto, PartnerResponseDto, PartnerSearchDto, PartnerUpdateDto } from 'src/dtos/partner.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { PartnerService } from 'src/services/partner.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Partners') +@ApiTags(ApiTag.Partners) @Controller('partners') export class PartnerController { constructor(private service: PartnerService) {} @Get() @Authenticated({ permission: Permission.PartnerRead }) + @ApiOperation({ + summary: 'Retrieve partners', + description: 'Retrieve a list of partners with whom assets are shared.', + }) getPartners(@Auth() auth: AuthDto, @Query() dto: PartnerSearchDto): Promise { return this.service.search(auth, dto); } @Post() @Authenticated({ permission: Permission.PartnerCreate }) + @ApiOperation({ + summary: 'Create a partner', + description: 'Create a new partner to share assets with.', + }) createPartner(@Auth() auth: AuthDto, @Body() dto: PartnerCreateDto): Promise { return this.service.create(auth, dto); } @Post(':id') - @EndpointLifecycle({ deprecatedAt: 'v1.141.0' }) + @EndpointLifecycle({ + deprecatedAt: 'v1.141.0', + summary: 'Create a partner', + description: 'Create a new partner to share assets with.', + }) @Authenticated({ permission: Permission.PartnerCreate }) createPartnerDeprecated(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.create(auth, { sharedWithId: id }); @@ -34,6 +46,10 @@ export class PartnerController { @Put(':id') @Authenticated({ permission: Permission.PartnerUpdate }) + @ApiOperation({ + summary: 'Update a partner', + description: "Specify whether a partner's assets should appear in the user's timeline.", + }) updatePartner( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -45,6 +61,10 @@ export class PartnerController { @Delete(':id') @Authenticated({ permission: Permission.PartnerDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Remove a partner', + description: 'Stop sharing assets with a partner.', + }) removePartner(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } diff --git a/server/src/controllers/person.controller.ts b/server/src/controllers/person.controller.ts index 84bb864cd3..6acb958444 100644 --- a/server/src/controllers/person.controller.ts +++ b/server/src/controllers/person.controller.ts @@ -12,7 +12,7 @@ import { Query, Res, } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { NextFunction, Response } from 'express'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; @@ -27,14 +27,14 @@ import { PersonStatisticsResponseDto, PersonUpdateDto, } from 'src/dtos/person.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { PersonService } from 'src/services/person.service'; import { sendFile } from 'src/utils/file'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('People') +@ApiTags(ApiTag.People) @Controller('people') export class PersonController { constructor( @@ -46,18 +46,24 @@ export class PersonController { @Get() @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ summary: 'Get all people', description: 'Retrieve a list of all people.' }) getAllPeople(@Auth() auth: AuthDto, @Query() options: PersonSearchDto): Promise { return this.service.getAll(auth, options); } @Post() @Authenticated({ permission: Permission.PersonCreate }) + @ApiOperation({ + summary: 'Create a person', + description: 'Create a new person that can have multiple faces assigned to them.', + }) createPerson(@Auth() auth: AuthDto, @Body() dto: PersonCreateDto): Promise { return this.service.create(auth, dto); } @Put() @Authenticated({ permission: Permission.PersonUpdate }) + @ApiOperation({ summary: 'Update people', description: 'Bulk update multiple people at once.' }) updatePeople(@Auth() auth: AuthDto, @Body() dto: PeopleUpdateDto): Promise { return this.service.updateAll(auth, dto); } @@ -65,18 +71,21 @@ export class PersonController { @Delete() @Authenticated({ permission: Permission.PersonDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ summary: 'Delete people', description: 'Bulk delete a list of people at once.' }) deletePeople(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ summary: 'Get a person', description: 'Retrieve a person by id.' }) getPerson(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getById(auth, id); } @Put(':id') @Authenticated({ permission: Permission.PersonUpdate }) + @ApiOperation({ summary: 'Update person', description: 'Update an individual person.' }) updatePerson( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -88,12 +97,14 @@ export class PersonController { @Delete(':id') @Authenticated({ permission: Permission.PersonDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ summary: 'Delete person', description: 'Delete an individual person.' }) deletePerson(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } @Get(':id/statistics') @Authenticated({ permission: Permission.PersonStatistics }) + @ApiOperation({ summary: 'Get person statistics', description: 'Retrieve statistics about a specific person.' }) getPersonStatistics(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getStatistics(auth, id); } @@ -101,6 +112,7 @@ export class PersonController { @Get(':id/thumbnail') @FileResponse() @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ summary: 'Get person thumbnail', description: 'Retrieve the thumbnail file for a person.' }) async getPersonThumbnail( @Res() res: Response, @Next() next: NextFunction, @@ -112,6 +124,7 @@ export class PersonController { @Put(':id/reassign') @Authenticated({ permission: Permission.PersonReassign }) + @ApiOperation({ summary: 'Reassign faces', description: 'Bulk reassign a list of faces to a different person.' }) reassignFaces( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -123,6 +136,10 @@ export class PersonController { @Post(':id/merge') @Authenticated({ permission: Permission.PersonMerge }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Merge people', + description: 'Merge a list of people into the person specified in the path parameter.', + }) mergePerson( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, diff --git a/server/src/controllers/search.controller.ts b/server/src/controllers/search.controller.ts index f9aa6bce81..e04fbaa3f6 100644 --- a/server/src/controllers/search.controller.ts +++ b/server/src/controllers/search.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Post, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { PersonResponseDto } from 'src/dtos/person.dto'; @@ -17,11 +17,11 @@ import { SmartSearchDto, StatisticsSearchDto, } from 'src/dtos/search.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { SearchService } from 'src/services/search.service'; -@ApiTags('Search') +@ApiTags(ApiTag.Search) @Controller('search') export class SearchController { constructor(private service: SearchService) {} @@ -29,6 +29,10 @@ export class SearchController { @Post('metadata') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search assets by metadata', + description: 'Search for assets based on various metadata criteria.', + }) searchAssets(@Auth() auth: AuthDto, @Body() dto: MetadataSearchDto): Promise { return this.service.searchMetadata(auth, dto); } @@ -36,6 +40,10 @@ export class SearchController { @Post('statistics') @Authenticated({ permission: Permission.AssetStatistics }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search asset statistics', + description: 'Retrieve statistical data about assets based on search criteria, such as the total matching count.', + }) searchAssetStatistics(@Auth() auth: AuthDto, @Body() dto: StatisticsSearchDto): Promise { return this.service.searchStatistics(auth, dto); } @@ -43,6 +51,10 @@ export class SearchController { @Post('random') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search random assets', + description: 'Retrieve a random selection of assets based on the provided criteria.', + }) searchRandom(@Auth() auth: AuthDto, @Body() dto: RandomSearchDto): Promise { return this.service.searchRandom(auth, dto); } @@ -50,6 +62,10 @@ export class SearchController { @Post('large-assets') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Search large assets', + description: 'Search for assets that are considered large based on specified criteria.', + }) searchLargeAssets(@Auth() auth: AuthDto, @Query() dto: LargeAssetSearchDto): Promise { return this.service.searchLargeAssets(auth, dto); } @@ -57,36 +73,62 @@ export class SearchController { @Post('smart') @Authenticated({ permission: Permission.AssetRead }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Smart asset search', + description: 'Perform a smart search for assets by using machine learning vectors to determine relevance.', + }) searchSmart(@Auth() auth: AuthDto, @Body() dto: SmartSearchDto): Promise { return this.service.searchSmart(auth, dto); } @Get('explore') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve explore data', + description: 'Retrieve data for the explore section, such as popular people and places.', + }) getExploreData(@Auth() auth: AuthDto): Promise { return this.service.getExploreData(auth); } @Get('person') @Authenticated({ permission: Permission.PersonRead }) + @ApiOperation({ + summary: 'Search people', + description: 'Search for people by name.', + }) searchPerson(@Auth() auth: AuthDto, @Query() dto: SearchPeopleDto): Promise { return this.service.searchPerson(auth, dto); } @Get('places') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Search places', + description: 'Search for places by name.', + }) searchPlaces(@Query() dto: SearchPlacesDto): Promise { return this.service.searchPlaces(dto); } @Get('cities') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve assets by city', + description: + 'Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in.', + }) getAssetsByCity(@Auth() auth: AuthDto): Promise { return this.service.getAssetsByCity(auth); } @Get('suggestions') @Authenticated({ permission: Permission.AssetRead }) + @ApiOperation({ + summary: 'Retrieve search suggestions', + description: + 'Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features.', + }) getSearchSuggestions(@Auth() auth: AuthDto, @Query() dto: SearchSuggestionRequestDto): Promise { // TODO fix open api generation to indicate that results can be nullable return this.service.getSearchSuggestions(auth, dto) as Promise; diff --git a/server/src/controllers/server.controller.ts b/server/src/controllers/server.controller.ts index f9a340eb31..c9c8539bb3 100644 --- a/server/src/controllers/server.controller.ts +++ b/server/src/controllers/server.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Put } from '@nestjs/common'; -import { ApiNotFoundResponse, ApiTags } from '@nestjs/swagger'; +import { ApiNotFoundResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto'; import { ServerAboutResponseDto, @@ -15,13 +15,13 @@ import { ServerVersionResponseDto, } from 'src/dtos/server.dto'; import { VersionCheckStateResponseDto } from 'src/dtos/system-metadata.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { ServerService } from 'src/services/server.service'; import { SystemMetadataService } from 'src/services/system-metadata.service'; import { VersionService } from 'src/services/version.service'; -@ApiTags('Server') +@ApiTags(ApiTag.Server) @Controller('server') export class ServerController { constructor( @@ -32,59 +32,85 @@ export class ServerController { @Get('about') @Authenticated({ permission: Permission.ServerAbout }) + @ApiOperation({ summary: 'Get server information', description: 'Retrieve a list of information about the server.' }) getAboutInfo(): Promise { return this.service.getAboutInfo(); } @Get('apk-links') @Authenticated({ permission: Permission.ServerApkLinks }) + @ApiOperation({ summary: 'Get APK links', description: 'Retrieve links to the APKs for the current server version.' }) getApkLinks(): ServerApkLinksDto { return this.service.getApkLinks(); } @Get('storage') @Authenticated({ permission: Permission.ServerStorage }) + @ApiOperation({ + summary: 'Get storage', + description: 'Retrieve the current storage utilization information of the server.', + }) getStorage(): Promise { return this.service.getStorage(); } @Get('ping') + @ApiOperation({ summary: 'Ping', description: 'Pong' }) pingServer(): ServerPingResponse { return this.service.ping(); } @Get('version') + @ApiOperation({ + summary: 'Get server version', + description: 'Retrieve the current server version in semantic versioning (semver) format.', + }) getServerVersion(): ServerVersionResponseDto { return this.versionService.getVersion(); } @Get('version-history') + @ApiOperation({ + summary: 'Get version history', + description: 'Retrieve a list of past versions the server has been on.', + }) getVersionHistory(): Promise { return this.versionService.getVersionHistory(); } @Get('features') + @ApiOperation({ summary: 'Get features', description: 'Retrieve available features supported by this server.' }) getServerFeatures(): Promise { return this.service.getFeatures(); } @Get('theme') + @ApiOperation({ summary: 'Get theme', description: 'Retrieve the custom CSS, if existent.' }) getTheme(): Promise { return this.service.getTheme(); } @Get('config') + @ApiOperation({ summary: 'Get config', description: 'Retrieve the current server configuration.' }) getServerConfig(): Promise { return this.service.getSystemConfig(); } @Get('statistics') @Authenticated({ permission: Permission.ServerStatistics, admin: true }) + @ApiOperation({ + summary: 'Get statistics', + description: 'Retrieve statistics about the entire Immich instance such as asset counts.', + }) getServerStatistics(): Promise { return this.service.getStatistics(); } @Get('media-types') + @ApiOperation({ + summary: 'Get supported media types', + description: 'Retrieve all media types supported by the server.', + }) getSupportedMediaTypes(): ServerMediaTypesResponseDto { return this.service.getSupportedMediaTypes(); } @@ -92,12 +118,20 @@ export class ServerController { @Get('license') @Authenticated({ permission: Permission.ServerLicenseRead, admin: true }) @ApiNotFoundResponse() + @ApiOperation({ + summary: 'Get product key', + description: 'Retrieve information about whether the server currently has a product key registered.', + }) getServerLicense(): Promise { return this.service.getLicense(); } @Put('license') @Authenticated({ permission: Permission.ServerLicenseUpdate, admin: true }) + @ApiOperation({ + summary: 'Set server product key', + description: 'Validate and set the server product key if successful.', + }) setServerLicense(@Body() license: LicenseKeyDto): Promise { return this.service.setLicense(license); } @@ -105,12 +139,17 @@ export class ServerController { @Delete('license') @Authenticated({ permission: Permission.ServerLicenseDelete, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ summary: 'Delete server product key', description: 'Delete the currently set server product key.' }) deleteServerLicense(): Promise { return this.service.deleteLicense(); } @Get('version-check') @Authenticated({ permission: Permission.ServerVersionCheck }) + @ApiOperation({ + summary: 'Get version check status', + description: 'Retrieve information about the last time the version check ran.', + }) getVersionCheck(): Promise { return this.systemMetadataService.getVersionCheckState(); } diff --git a/server/src/controllers/session.controller.ts b/server/src/controllers/session.controller.ts index cbe8158fee..47cd7a6f19 100644 --- a/server/src/controllers/session.controller.ts +++ b/server/src/controllers/session.controller.ts @@ -1,25 +1,33 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { SessionCreateDto, SessionCreateResponseDto, SessionResponseDto, SessionUpdateDto } from 'src/dtos/session.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { SessionService } from 'src/services/session.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Sessions') +@ApiTags(ApiTag.Sessions) @Controller('sessions') export class SessionController { constructor(private service: SessionService) {} @Post() @Authenticated({ permission: Permission.SessionCreate }) + @ApiOperation({ + summary: 'Create a session', + description: 'Create a session as a child to the current session. This endpoint is used for casting.', + }) createSession(@Auth() auth: AuthDto, @Body() dto: SessionCreateDto): Promise { return this.service.create(auth, dto); } @Get() @Authenticated({ permission: Permission.SessionRead }) + @ApiOperation({ + summary: 'Retrieve sessions', + description: 'Retrieve a list of sessions for the user.', + }) getSessions(@Auth() auth: AuthDto): Promise { return this.service.getAll(auth); } @@ -27,12 +35,20 @@ export class SessionController { @Delete() @Authenticated({ permission: Permission.SessionDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete all sessions', + description: 'Delete all sessions for the user. This will not delete the current session.', + }) deleteAllSessions(@Auth() auth: AuthDto): Promise { return this.service.deleteAll(auth); } @Put(':id') @Authenticated({ permission: Permission.SessionUpdate }) + @ApiOperation({ + summary: 'Update a session', + description: 'Update a specific session identified by id.', + }) updateSession( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -44,6 +60,10 @@ export class SessionController { @Delete(':id') @Authenticated({ permission: Permission.SessionDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a session', + description: 'Delete a specific session by id.', + }) deleteSession(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } @@ -51,6 +71,10 @@ export class SessionController { @Post(':id/lock') @Authenticated({ permission: Permission.SessionLock }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Lock a session', + description: 'Lock a specific session by id.', + }) lockSession(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.lock(auth, id); } diff --git a/server/src/controllers/shared-link.controller.ts b/server/src/controllers/shared-link.controller.ts index ef0a93e012..e3e55f2941 100644 --- a/server/src/controllers/shared-link.controller.ts +++ b/server/src/controllers/shared-link.controller.ts @@ -13,7 +13,7 @@ import { Req, Res, } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Request, Response } from 'express'; import { AssetIdsResponseDto } from 'src/dtos/asset-ids.response.dto'; import { AssetIdsDto } from 'src/dtos/asset.dto'; @@ -25,26 +25,34 @@ import { SharedLinkResponseDto, SharedLinkSearchDto, } from 'src/dtos/shared-link.dto'; -import { ImmichCookie, Permission } from 'src/enum'; +import { ApiTag, ImmichCookie, Permission } from 'src/enum'; import { Auth, Authenticated, GetLoginDetails } from 'src/middleware/auth.guard'; import { LoginDetails } from 'src/services/auth.service'; import { SharedLinkService } from 'src/services/shared-link.service'; import { respondWithCookie } from 'src/utils/response'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Shared Links') +@ApiTags(ApiTag.SharedLinks) @Controller('shared-links') export class SharedLinkController { constructor(private service: SharedLinkService) {} @Get() @Authenticated({ permission: Permission.SharedLinkRead }) + @ApiOperation({ + summary: 'Retrieve all shared links', + description: 'Retrieve a list of all shared links.', + }) getAllSharedLinks(@Auth() auth: AuthDto, @Query() dto: SharedLinkSearchDto): Promise { return this.service.getAll(auth, dto); } @Get('me') @Authenticated({ sharedLink: true }) + @ApiOperation({ + summary: 'Retrieve current shared link', + description: 'Retrieve the current shared link associated with authentication method.', + }) async getMySharedLink( @Auth() auth: AuthDto, @Query() dto: SharedLinkPasswordDto, @@ -65,18 +73,30 @@ export class SharedLinkController { @Get(':id') @Authenticated({ permission: Permission.SharedLinkRead }) + @ApiOperation({ + summary: 'Retrieve a shared link', + description: 'Retrieve a specific shared link by its ID.', + }) getSharedLinkById(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Post() @Authenticated({ permission: Permission.SharedLinkCreate }) + @ApiOperation({ + summary: 'Create a shared link', + description: 'Create a new shared link.', + }) createSharedLink(@Auth() auth: AuthDto, @Body() dto: SharedLinkCreateDto) { return this.service.create(auth, dto); } @Patch(':id') @Authenticated({ permission: Permission.SharedLinkUpdate }) + @ApiOperation({ + summary: 'Update a shared link', + description: 'Update an existing shared link by its ID.', + }) updateSharedLink( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -88,12 +108,21 @@ export class SharedLinkController { @Delete(':id') @Authenticated({ permission: Permission.SharedLinkDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a shared link', + description: 'Delete a specific shared link by its ID.', + }) removeSharedLink(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } @Put(':id/assets') @Authenticated({ sharedLink: true }) + @ApiOperation({ + summary: 'Add assets to a shared link', + description: + 'Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.', + }) addSharedLinkAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -104,6 +133,11 @@ export class SharedLinkController { @Delete(':id/assets') @Authenticated({ sharedLink: true }) + @ApiOperation({ + summary: 'Remove assets from a shared link', + description: + 'Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.', + }) removeSharedLinkAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, diff --git a/server/src/controllers/stack.controller.ts b/server/src/controllers/stack.controller.ts index 6acd4abc24..def3900c71 100644 --- a/server/src/controllers/stack.controller.ts +++ b/server/src/controllers/stack.controller.ts @@ -1,26 +1,35 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { StackCreateDto, StackResponseDto, StackSearchDto, StackUpdateDto } from 'src/dtos/stack.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { StackService } from 'src/services/stack.service'; import { UUIDAssetIDParamDto, UUIDParamDto } from 'src/validation'; -@ApiTags('Stacks') +@ApiTags(ApiTag.Stacks) @Controller('stacks') export class StackController { constructor(private service: StackService) {} @Get() @Authenticated({ permission: Permission.StackRead }) + @ApiOperation({ + summary: 'Retrieve stacks', + description: 'Retrieve a list of stacks.', + }) searchStacks(@Auth() auth: AuthDto, @Query() query: StackSearchDto): Promise { return this.service.search(auth, query); } @Post() @Authenticated({ permission: Permission.StackCreate }) + @ApiOperation({ + summary: 'Create a stack', + description: + 'Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.', + }) createStack(@Auth() auth: AuthDto, @Body() dto: StackCreateDto): Promise { return this.service.create(auth, dto); } @@ -28,18 +37,30 @@ export class StackController { @Delete() @Authenticated({ permission: Permission.StackDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete stacks', + description: 'Delete multiple stacks by providing a list of stack IDs.', + }) deleteStacks(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.deleteAll(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.StackRead }) + @ApiOperation({ + summary: 'Retrieve a stack', + description: 'Retrieve a specific stack by its ID.', + }) getStack(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.StackUpdate }) + @ApiOperation({ + summary: 'Update a stack', + description: 'Update an existing stack by its ID.', + }) updateStack( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -51,6 +72,10 @@ export class StackController { @Delete(':id') @Authenticated({ permission: Permission.StackDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a stack', + description: 'Delete a specific stack by its ID.', + }) deleteStack(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.delete(auth, id); } @@ -58,6 +83,10 @@ export class StackController { @Delete(':id/assets/:assetId') @Authenticated({ permission: Permission.StackUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Remove an asset from a stack', + description: 'Remove a specific asset from a stack by providing the stack ID and asset ID.', + }) removeAssetFromStack(@Auth() auth: AuthDto, @Param() dto: UUIDAssetIDParamDto): Promise { return this.service.removeAsset(auth, dto); } diff --git a/server/src/controllers/sync.controller.ts b/server/src/controllers/sync.controller.ts index 61432e43e3..1f105e6b25 100644 --- a/server/src/controllers/sync.controller.ts +++ b/server/src/controllers/sync.controller.ts @@ -1,6 +1,7 @@ import { Body, Controller, Delete, Get, Header, HttpCode, HttpStatus, Post, Res } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { Response } from 'express'; +import { EndpointLifecycle } from 'src/decorators'; import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { @@ -12,12 +13,12 @@ import { SyncAckSetDto, SyncStreamDto, } from 'src/dtos/sync.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { GlobalExceptionFilter } from 'src/middleware/global-exception.filter'; import { SyncService } from 'src/services/sync.service'; -@ApiTags('Sync') +@ApiTags(ApiTag.Sync) @Controller('sync') export class SyncController { constructor( @@ -28,6 +29,11 @@ export class SyncController { @Post('full-sync') @Authenticated() @HttpCode(HttpStatus.OK) + @EndpointLifecycle({ + deprecatedAt: 'v2.0.0', + summary: 'Get full sync for user', + description: 'Retrieve all assets for a full synchronization for the authenticated user.', + }) getFullSyncForUser(@Auth() auth: AuthDto, @Body() dto: AssetFullSyncDto): Promise { return this.service.getFullSync(auth, dto); } @@ -35,6 +41,11 @@ export class SyncController { @Post('delta-sync') @Authenticated() @HttpCode(HttpStatus.OK) + @EndpointLifecycle({ + deprecatedAt: 'v2.0.0', + summary: 'Get delta sync for user', + description: 'Retrieve changed assets since the last sync for the authenticated user.', + }) getDeltaSync(@Auth() auth: AuthDto, @Body() dto: AssetDeltaSyncDto): Promise { return this.service.getDeltaSync(auth, dto); } @@ -43,6 +54,11 @@ export class SyncController { @Authenticated({ permission: Permission.SyncStream }) @Header('Content-Type', 'application/jsonlines+json') @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Stream sync changes', + description: + 'Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.', + }) async getSyncStream(@Auth() auth: AuthDto, @Res() res: Response, @Body() dto: SyncStreamDto) { try { await this.service.stream(auth, res, dto); @@ -54,6 +70,10 @@ export class SyncController { @Get('ack') @Authenticated({ permission: Permission.SyncCheckpointRead }) + @ApiOperation({ + summary: 'Retrieve acknowledgements', + description: 'Retrieve the synchronization acknowledgments for the current session.', + }) getSyncAck(@Auth() auth: AuthDto): Promise { return this.service.getAcks(auth); } @@ -61,6 +81,11 @@ export class SyncController { @Post('ack') @Authenticated({ permission: Permission.SyncCheckpointUpdate }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Acknowledge changes', + description: + 'Send a list of synchronization acknowledgements to confirm that the latest changes have been received.', + }) sendSyncAck(@Auth() auth: AuthDto, @Body() dto: SyncAckSetDto) { return this.service.setAcks(auth, dto); } @@ -68,6 +93,10 @@ export class SyncController { @Delete('ack') @Authenticated({ permission: Permission.SyncCheckpointDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete acknowledgements', + description: 'Delete specific synchronization acknowledgments.', + }) deleteSyncAck(@Auth() auth: AuthDto, @Body() dto: SyncAckDeleteDto): Promise { return this.service.deleteAcks(auth, dto); } diff --git a/server/src/controllers/system-config.controller.ts b/server/src/controllers/system-config.controller.ts index 69117f4d45..66d62135b7 100644 --- a/server/src/controllers/system-config.controller.ts +++ b/server/src/controllers/system-config.controller.ts @@ -1,12 +1,12 @@ import { Body, Controller, Get, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { SystemConfigDto, SystemConfigTemplateStorageOptionDto } from 'src/dtos/system-config.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { StorageTemplateService } from 'src/services/storage-template.service'; import { SystemConfigService } from 'src/services/system-config.service'; -@ApiTags('System Config') +@ApiTags(ApiTag.SystemConfig) @Controller('system-config') export class SystemConfigController { constructor( @@ -16,24 +16,37 @@ export class SystemConfigController { @Get() @Authenticated({ permission: Permission.SystemConfigRead, admin: true }) + @ApiOperation({ summary: 'Get system configuration', description: 'Retrieve the current system configuration.' }) getConfig(): Promise { return this.service.getSystemConfig(); } @Get('defaults') @Authenticated({ permission: Permission.SystemConfigRead, admin: true }) + @ApiOperation({ + summary: 'Get system configuration defaults', + description: 'Retrieve the default values for the system configuration.', + }) getConfigDefaults(): SystemConfigDto { return this.service.getDefaults(); } @Put() @Authenticated({ permission: Permission.SystemConfigUpdate, admin: true }) + @ApiOperation({ + summary: 'Update system configuration', + description: 'Update the system configuration with a new system configuration.', + }) updateConfig(@Body() dto: SystemConfigDto): Promise { return this.service.updateSystemConfig(dto); } @Get('storage-template-options') @Authenticated({ permission: Permission.SystemConfigRead, admin: true }) + @ApiOperation({ + summary: 'Get storage template options', + description: 'Retrieve exemplary storage template options.', + }) getStorageTemplateOptions(): SystemConfigTemplateStorageOptionDto { return this.storageTemplateService.getStorageTemplateOptions(); } diff --git a/server/src/controllers/system-metadata.controller.ts b/server/src/controllers/system-metadata.controller.ts index d6634e9444..f97eb3877c 100644 --- a/server/src/controllers/system-metadata.controller.ts +++ b/server/src/controllers/system-metadata.controller.ts @@ -1,21 +1,25 @@ import { Body, Controller, Get, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AdminOnboardingUpdateDto, ReverseGeocodingStateResponseDto, VersionCheckStateResponseDto, } from 'src/dtos/system-metadata.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Authenticated } from 'src/middleware/auth.guard'; import { SystemMetadataService } from 'src/services/system-metadata.service'; -@ApiTags('System Metadata') +@ApiTags(ApiTag.SystemMetadata) @Controller('system-metadata') export class SystemMetadataController { constructor(private service: SystemMetadataService) {} @Get('admin-onboarding') @Authenticated({ permission: Permission.SystemMetadataRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve admin onboarding', + description: 'Retrieve the current admin onboarding status.', + }) getAdminOnboarding(): Promise { return this.service.getAdminOnboarding(); } @@ -23,18 +27,30 @@ export class SystemMetadataController { @Post('admin-onboarding') @Authenticated({ permission: Permission.SystemMetadataUpdate, admin: true }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Update admin onboarding', + description: 'Update the admin onboarding status.', + }) updateAdminOnboarding(@Body() dto: AdminOnboardingUpdateDto): Promise { return this.service.updateAdminOnboarding(dto); } @Get('reverse-geocoding-state') @Authenticated({ permission: Permission.SystemMetadataRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve reverse geocoding state', + description: 'Retrieve the current state of the reverse geocoding import.', + }) getReverseGeocodingState(): Promise { return this.service.getReverseGeocodingState(); } @Get('version-check-state') @Authenticated({ permission: Permission.SystemMetadataRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve version check state', + description: 'Retrieve the current state of the version check process.', + }) getVersionCheckState(): Promise { return this.service.getVersionCheckState(); } diff --git a/server/src/controllers/tag.controller.ts b/server/src/controllers/tag.controller.ts index 59915ef2a4..514718f106 100644 --- a/server/src/controllers/tag.controller.ts +++ b/server/src/controllers/tag.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdResponseDto, BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { @@ -10,48 +10,72 @@ import { TagUpdateDto, TagUpsertDto, } from 'src/dtos/tag.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { TagService } from 'src/services/tag.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Tags') +@ApiTags(ApiTag.Tags) @Controller('tags') export class TagController { constructor(private service: TagService) {} @Post() @Authenticated({ permission: Permission.TagCreate }) + @ApiOperation({ + summary: 'Create a tag', + description: 'Create a new tag by providing a name and optional color.', + }) createTag(@Auth() auth: AuthDto, @Body() dto: TagCreateDto): Promise { return this.service.create(auth, dto); } @Get() @Authenticated({ permission: Permission.TagRead }) + @ApiOperation({ + summary: 'Retrieve tags', + description: 'Retrieve a list of all tags.', + }) getAllTags(@Auth() auth: AuthDto): Promise { return this.service.getAll(auth); } @Put() @Authenticated({ permission: Permission.TagCreate }) + @ApiOperation({ + summary: 'Upsert tags', + description: 'Create or update multiple tags in a single request.', + }) upsertTags(@Auth() auth: AuthDto, @Body() dto: TagUpsertDto): Promise { return this.service.upsert(auth, dto); } @Put('assets') @Authenticated({ permission: Permission.TagAsset }) + @ApiOperation({ + summary: 'Tag assets', + description: 'Add multiple tags to multiple assets in a single request.', + }) bulkTagAssets(@Auth() auth: AuthDto, @Body() dto: TagBulkAssetsDto): Promise { return this.service.bulkTagAssets(auth, dto); } @Get(':id') @Authenticated({ permission: Permission.TagRead }) + @ApiOperation({ + summary: 'Retrieve a tag', + description: 'Retrieve a specific tag by its ID.', + }) getTagById(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.TagUpdate }) + @ApiOperation({ + summary: 'Update a tag', + description: 'Update an existing tag identified by its ID.', + }) updateTag(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @Body() dto: TagUpdateDto): Promise { return this.service.update(auth, id, dto); } @@ -59,12 +83,20 @@ export class TagController { @Delete(':id') @Authenticated({ permission: Permission.TagDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete a tag', + description: 'Delete a specific tag by its ID.', + }) deleteTag(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.remove(auth, id); } @Put(':id/assets') @Authenticated({ permission: Permission.TagAsset }) + @ApiOperation({ + summary: 'Tag assets', + description: 'Add a tag to all the specified assets.', + }) tagAssets( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -75,6 +107,10 @@ export class TagController { @Delete(':id/assets') @Authenticated({ permission: Permission.TagAsset }) + @ApiOperation({ + summary: 'Untag assets', + description: 'Remove a tag from all the specified assets.', + }) untagAssets( @Auth() auth: AuthDto, @Body() dto: BulkIdsDto, diff --git a/server/src/controllers/timeline.controller.ts b/server/src/controllers/timeline.controller.ts index 8cab840ec8..c2d3284fd4 100644 --- a/server/src/controllers/timeline.controller.ts +++ b/server/src/controllers/timeline.controller.ts @@ -1,18 +1,19 @@ import { Controller, Get, Header, Query } from '@nestjs/common'; -import { ApiOkResponse, ApiTags } from '@nestjs/swagger'; +import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import { AuthDto } from 'src/dtos/auth.dto'; import { TimeBucketAssetDto, TimeBucketAssetResponseDto, TimeBucketDto } from 'src/dtos/time-bucket.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { TimelineService } from 'src/services/timeline.service'; -@ApiTags('Timeline') +@ApiTags(ApiTag.Timeline) @Controller('timeline') export class TimelineController { constructor(private service: TimelineService) {} @Get('buckets') @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) + @ApiOperation({ summary: 'Get time buckets', description: 'Retrieve a list of all minimal time buckets.' }) getTimeBuckets(@Auth() auth: AuthDto, @Query() dto: TimeBucketDto) { return this.service.getTimeBuckets(auth, dto); } @@ -21,6 +22,10 @@ export class TimelineController { @Authenticated({ permission: Permission.AssetRead, sharedLink: true }) @ApiOkResponse({ type: TimeBucketAssetResponseDto }) @Header('Content-Type', 'application/json') + @ApiOperation({ + summary: 'Get time bucket', + description: 'Retrieve a string of all asset ids in a given time bucket.', + }) getTimeBucket(@Auth() auth: AuthDto, @Query() dto: TimeBucketAssetDto) { return this.service.getTimeBucket(auth, dto); } diff --git a/server/src/controllers/trash.controller.ts b/server/src/controllers/trash.controller.ts index eaf489f104..1b7ab6a39e 100644 --- a/server/src/controllers/trash.controller.ts +++ b/server/src/controllers/trash.controller.ts @@ -1,13 +1,13 @@ import { Body, Controller, HttpCode, HttpStatus, Post } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { BulkIdsDto } from 'src/dtos/asset-ids.response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { TrashResponseDto } from 'src/dtos/trash.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { TrashService } from 'src/services/trash.service'; -@ApiTags('Trash') +@ApiTags(ApiTag.Trash) @Controller('trash') export class TrashController { constructor(private service: TrashService) {} @@ -15,6 +15,10 @@ export class TrashController { @Post('empty') @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Empty trash', + description: 'Permanently delete all items in the trash.', + }) emptyTrash(@Auth() auth: AuthDto): Promise { return this.service.empty(auth); } @@ -22,6 +26,10 @@ export class TrashController { @Post('restore') @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Restore trash', + description: 'Restore all items in the trash.', + }) restoreTrash(@Auth() auth: AuthDto): Promise { return this.service.restore(auth); } @@ -29,6 +37,10 @@ export class TrashController { @Post('restore/assets') @Authenticated({ permission: Permission.AssetDelete }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Restore assets', + description: 'Restore specific assets from the trash.', + }) restoreAssets(@Auth() auth: AuthDto, @Body() dto: BulkIdsDto): Promise { return this.service.restoreAssets(auth, dto); } diff --git a/server/src/controllers/user-admin.controller.ts b/server/src/controllers/user-admin.controller.ts index 25a4691b75..466cbb6f10 100644 --- a/server/src/controllers/user-admin.controller.ts +++ b/server/src/controllers/user-admin.controller.ts @@ -1,5 +1,5 @@ import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetStatsDto, AssetStatsResponseDto } from 'src/dtos/asset.dto'; import { AuthDto } from 'src/dtos/auth.dto'; import { SessionResponseDto } from 'src/dtos/session.dto'; @@ -11,36 +11,52 @@ import { UserAdminSearchDto, UserAdminUpdateDto, } from 'src/dtos/user.dto'; -import { Permission } from 'src/enum'; +import { ApiTag, Permission } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { UserAdminService } from 'src/services/user-admin.service'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Users (admin)') +@ApiTags(ApiTag.UsersAdmin) @Controller('admin/users') export class UserAdminController { constructor(private service: UserAdminService) {} @Get() @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Search users', + description: 'Search for users.', + }) searchUsersAdmin(@Auth() auth: AuthDto, @Query() dto: UserAdminSearchDto): Promise { return this.service.search(auth, dto); } @Post() @Authenticated({ permission: Permission.AdminUserCreate, admin: true }) + @ApiOperation({ + summary: 'Create a user', + description: 'Create a new user.', + }) createUserAdmin(@Body() createUserDto: UserAdminCreateDto): Promise { return this.service.create(createUserDto); } @Get(':id') @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve a user', + description: 'Retrieve a specific user by their ID.', + }) getUserAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.get(auth, id); } @Put(':id') @Authenticated({ permission: Permission.AdminUserUpdate, admin: true }) + @ApiOperation({ + summary: 'Update a user', + description: 'Update an existing user.', + }) updateUserAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -51,6 +67,10 @@ export class UserAdminController { @Delete(':id') @Authenticated({ permission: Permission.AdminUserDelete, admin: true }) + @ApiOperation({ + summary: 'Delete a user', + description: 'Delete a user.', + }) deleteUserAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -61,12 +81,20 @@ export class UserAdminController { @Get(':id/sessions') @Authenticated({ permission: Permission.AdminSessionRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve user sessions', + description: 'Retrieve all sessions for a specific user.', + }) getUserSessionsAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getSessions(auth, id); } @Get(':id/statistics') @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve user statistics', + description: 'Retrieve asset statistics for a specific user.', + }) getUserStatisticsAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -77,12 +105,20 @@ export class UserAdminController { @Get(':id/preferences') @Authenticated({ permission: Permission.AdminUserRead, admin: true }) + @ApiOperation({ + summary: 'Retrieve user preferences', + description: 'Retrieve the preferences of a specific user.', + }) getUserPreferencesAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.getPreferences(auth, id); } @Put(':id/preferences') @Authenticated({ permission: Permission.AdminUserUpdate, admin: true }) + @ApiOperation({ + summary: 'Update user preferences', + description: 'Update the preferences of a specific user.', + }) updateUserPreferencesAdmin( @Auth() auth: AuthDto, @Param() { id }: UUIDParamDto, @@ -94,6 +130,10 @@ export class UserAdminController { @Post(':id/restore') @Authenticated({ permission: Permission.AdminUserDelete, admin: true }) @HttpCode(HttpStatus.OK) + @ApiOperation({ + summary: 'Restore a deleted user', + description: 'Restore a previously deleted user.', + }) restoreUserAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise { return this.service.restore(auth, id); } diff --git a/server/src/controllers/user.controller.ts b/server/src/controllers/user.controller.ts index d72b088c54..d76daaa0d5 100644 --- a/server/src/controllers/user.controller.ts +++ b/server/src/controllers/user.controller.ts @@ -13,7 +13,7 @@ import { UploadedFile, UseInterceptors, } from '@nestjs/common'; -import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger'; +import { ApiBody, ApiConsumes, ApiOperation, ApiTags } from '@nestjs/swagger'; import { NextFunction, Response } from 'express'; import { AuthDto } from 'src/dtos/auth.dto'; import { LicenseKeyDto, LicenseResponseDto } from 'src/dtos/license.dto'; @@ -21,7 +21,7 @@ import { OnboardingDto, OnboardingResponseDto } from 'src/dtos/onboarding.dto'; import { UserPreferencesResponseDto, UserPreferencesUpdateDto } from 'src/dtos/user-preferences.dto'; import { CreateProfileImageDto, CreateProfileImageResponseDto } from 'src/dtos/user-profile.dto'; import { UserAdminResponseDto, UserResponseDto, UserUpdateMeDto } from 'src/dtos/user.dto'; -import { Permission, RouteKey } from 'src/enum'; +import { ApiTag, Permission, RouteKey } from 'src/enum'; import { Auth, Authenticated, FileResponse } from 'src/middleware/auth.guard'; import { FileUploadInterceptor } from 'src/middleware/file-upload.interceptor'; import { LoggingRepository } from 'src/repositories/logging.repository'; @@ -29,7 +29,7 @@ import { UserService } from 'src/services/user.service'; import { sendFile } from 'src/utils/file'; import { UUIDParamDto } from 'src/validation'; -@ApiTags('Users') +@ApiTags(ApiTag.Users) @Controller(RouteKey.User) export class UserController { constructor( @@ -39,30 +39,38 @@ export class UserController { @Get() @Authenticated({ permission: Permission.UserRead }) + @ApiOperation({ summary: 'Get all users', description: 'Retrieve a list of all users on the server.' }) searchUsers(@Auth() auth: AuthDto): Promise { return this.service.search(auth); } @Get('me') @Authenticated({ permission: Permission.UserRead }) + @ApiOperation({ + summary: 'Get current user', + description: 'Retrieve information about the user making the API request.', + }) getMyUser(@Auth() auth: AuthDto): Promise { return this.service.getMe(auth); } @Put('me') @Authenticated({ permission: Permission.UserUpdate }) + @ApiOperation({ summary: 'Update current user', description: 'Update the current user making teh API request.' }) updateMyUser(@Auth() auth: AuthDto, @Body() dto: UserUpdateMeDto): Promise { return this.service.updateMe(auth, dto); } @Get('me/preferences') @Authenticated({ permission: Permission.UserPreferenceRead }) + @ApiOperation({ summary: 'Get my preferences', description: 'Retrieve the preferences for the current user.' }) getMyPreferences(@Auth() auth: AuthDto): Promise { return this.service.getMyPreferences(auth); } @Put('me/preferences') @Authenticated({ permission: Permission.UserPreferenceUpdate }) + @ApiOperation({ summary: 'Update my preferences', description: 'Update the preferences of the current user.' }) updateMyPreferences( @Auth() auth: AuthDto, @Body() dto: UserPreferencesUpdateDto, @@ -72,12 +80,20 @@ export class UserController { @Get('me/license') @Authenticated({ permission: Permission.UserLicenseRead }) + @ApiOperation({ + summary: 'Retrieve user product key', + description: 'Retrieve information about whether the current user has a registered product key.', + }) getUserLicense(@Auth() auth: AuthDto): Promise { return this.service.getLicense(auth); } @Put('me/license') @Authenticated({ permission: Permission.UserLicenseUpdate }) + @ApiOperation({ + summary: 'Set user product key', + description: 'Register a product key for the current user.', + }) async setUserLicense(@Auth() auth: AuthDto, @Body() license: LicenseKeyDto): Promise { return this.service.setLicense(auth, license); } @@ -85,18 +101,30 @@ export class UserController { @Delete('me/license') @Authenticated({ permission: Permission.UserLicenseDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete user product key', + description: 'Delete the registered product key for the current user.', + }) async deleteUserLicense(@Auth() auth: AuthDto): Promise { await this.service.deleteLicense(auth); } @Get('me/onboarding') @Authenticated({ permission: Permission.UserOnboardingRead }) + @ApiOperation({ + summary: 'Retrieve user onboarding', + description: 'Retrieve the onboarding status of the current user.', + }) getUserOnboarding(@Auth() auth: AuthDto): Promise { return this.service.getOnboarding(auth); } @Put('me/onboarding') @Authenticated({ permission: Permission.UserOnboardingUpdate }) + @ApiOperation({ + summary: 'Update user onboarding', + description: 'Update the onboarding status of the current user.', + }) async setUserOnboarding(@Auth() auth: AuthDto, @Body() Onboarding: OnboardingDto): Promise { return this.service.setOnboarding(auth, Onboarding); } @@ -104,12 +132,20 @@ export class UserController { @Delete('me/onboarding') @Authenticated({ permission: Permission.UserOnboardingDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete user onboarding', + description: 'Delete the onboarding status of the current user.', + }) async deleteUserOnboarding(@Auth() auth: AuthDto): Promise { await this.service.deleteOnboarding(auth); } @Get(':id') @Authenticated({ permission: Permission.UserRead }) + @ApiOperation({ + summary: 'Retrieve a user', + description: 'Retrieve a specific user by their ID.', + }) getUser(@Param() { id }: UUIDParamDto): Promise { return this.service.get(id); } @@ -119,6 +155,10 @@ export class UserController { @UseInterceptors(FileUploadInterceptor) @ApiConsumes('multipart/form-data') @ApiBody({ description: 'A new avatar for the user', type: CreateProfileImageDto }) + @ApiOperation({ + summary: 'Create user profile image', + description: 'Upload and set a new profile image for the current user.', + }) createProfileImage( @Auth() auth: AuthDto, @UploadedFile() fileInfo: Express.Multer.File, @@ -129,6 +169,10 @@ export class UserController { @Delete('profile-image') @Authenticated({ permission: Permission.UserProfileImageDelete }) @HttpCode(HttpStatus.NO_CONTENT) + @ApiOperation({ + summary: 'Delete user profile image', + description: 'Delete the profile image of the current user.', + }) deleteProfileImage(@Auth() auth: AuthDto): Promise { return this.service.deleteProfileImage(auth); } @@ -136,6 +180,10 @@ export class UserController { @Get(':id/profile-image') @FileResponse() @Authenticated({ permission: Permission.UserProfileImageRead }) + @ApiOperation({ + summary: 'Retrieve user profile image', + description: 'Retrieve the profile image file for a user.', + }) async getProfileImage(@Res() res: Response, @Next() next: NextFunction, @Param() { id }: UUIDParamDto) { await sendFile(res, next, () => this.service.getProfileImage(id), this.logger); } diff --git a/server/src/controllers/view.controller.ts b/server/src/controllers/view.controller.ts index b5e281e093..8d0cbb0d96 100644 --- a/server/src/controllers/view.controller.ts +++ b/server/src/controllers/view.controller.ts @@ -1,23 +1,32 @@ import { Controller, Get, Query } from '@nestjs/common'; -import { ApiTags } from '@nestjs/swagger'; +import { ApiOperation, ApiTags } from '@nestjs/swagger'; import { AssetResponseDto } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; +import { ApiTag } from 'src/enum'; import { Auth, Authenticated } from 'src/middleware/auth.guard'; import { ViewService } from 'src/services/view.service'; -@ApiTags('View') +@ApiTags(ApiTag.Views) @Controller('view') export class ViewController { constructor(private service: ViewService) {} @Get('folder/unique-paths') @Authenticated() + @ApiOperation({ + summary: 'Retrieve unique paths', + description: 'Retrieve a list of unique folder paths from asset original paths.', + }) getUniqueOriginalPaths(@Auth() auth: AuthDto): Promise { return this.service.getUniqueOriginalPaths(auth); } @Get('folder') @Authenticated() + @ApiOperation({ + summary: 'Retrieve assets by original path', + description: 'Retrieve assets that are children of a specific folder.', + }) getAssetsByOriginalPath(@Auth() auth: AuthDto, @Query('path') path: string): Promise { return this.service.getAssetsByOriginalPath(auth, path); } diff --git a/server/src/database.ts b/server/src/database.ts index f60c2c228c..b62cb70347 100644 --- a/server/src/database.ts +++ b/server/src/database.ts @@ -356,7 +356,7 @@ export const columns = { 'asset.stackId', 'asset.libraryId', ], - syncAlbumUser: ['album_user.albumsId as albumId', 'album_user.usersId as userId', 'album_user.role'], + syncAlbumUser: ['album_user.albumId as albumId', 'album_user.userId as userId', 'album_user.role'], syncStack: ['stack.id', 'stack.createdAt', 'stack.updatedAt', 'stack.primaryAssetId', 'stack.ownerId'], syncUser: ['id', 'name', 'email', 'avatarColor', 'deletedAt', 'updateId', 'profileImagePath', 'profileChangedAt'], stack: ['stack.id', 'stack.primaryAssetId', 'ownerId'], diff --git a/server/src/decorators.ts b/server/src/decorators.ts index 8a8e23d880..e9f27fa9ec 100644 --- a/server/src/decorators.ts +++ b/server/src/decorators.ts @@ -2,7 +2,7 @@ import { SetMetadata, applyDecorators } from '@nestjs/common'; import { ApiExtension, ApiOperation, ApiOperationOptions, ApiProperty, ApiTags } from '@nestjs/swagger'; import _ from 'lodash'; import { ADDED_IN_PREFIX, DEPRECATED_IN_PREFIX, LIFECYCLE_EXTENSION } from 'src/constants'; -import { ImmichWorker, JobName, MetadataKey, QueueName } from 'src/enum'; +import { ApiTag, ImmichWorker, JobName, MetadataKey, QueueName } from 'src/enum'; import { EmitEvent } from 'src/repositories/event.repository'; import { immich_uuid_v7, updated_at } from 'src/schema/functions'; import { BeforeUpdateTrigger, Column, ColumnOptions } from 'src/sql-tools'; @@ -168,7 +168,7 @@ export const EndpointLifecycle = ({ const decorators: MethodDecorator[] = [ApiExtension(LIFECYCLE_EXTENSION, { addedAt, deprecatedAt })]; if (deprecatedAt) { decorators.push( - ApiTags('Deprecated'), + ApiTags(ApiTag.Deprecated), ApiOperation({ deprecated: true, description: DEPRECATED_IN_PREFIX + deprecatedAt + (description ? `. ${description}` : ''), diff --git a/server/src/dtos/memory.dto.ts b/server/src/dtos/memory.dto.ts index a79511c73e..8a86e66691 100644 --- a/server/src/dtos/memory.dto.ts +++ b/server/src/dtos/memory.dto.ts @@ -4,7 +4,7 @@ import { IsInt, IsObject, IsPositive, ValidateNested } from 'class-validator'; import { Memory } from 'src/database'; import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto'; import { AuthDto } from 'src/dtos/auth.dto'; -import { MemoryType } from 'src/enum'; +import { AssetOrderWithRandom, MemoryType } from 'src/enum'; import { ValidateBoolean, ValidateDate, ValidateEnum, ValidateUUID } from 'src/validation'; class MemoryBaseDto { @@ -27,6 +27,15 @@ export class MemorySearchDto { @ValidateBoolean({ optional: true }) isSaved?: boolean; + + @IsInt() + @IsPositive() + @Type(() => Number) + @ApiProperty({ type: 'integer', description: 'Number of memories to return' }) + size?: number; + + @ValidateEnum({ enum: AssetOrderWithRandom, name: 'MemorySearchOrder', optional: true }) + order?: AssetOrderWithRandom; } class OnThisDayDto { diff --git a/server/src/dtos/user-preferences.dto.ts b/server/src/dtos/user-preferences.dto.ts index b258158ae2..452384b423 100644 --- a/server/src/dtos/user-preferences.dto.ts +++ b/server/src/dtos/user-preferences.dto.ts @@ -13,6 +13,12 @@ class AvatarUpdate { class MemoriesUpdate { @ValidateBoolean({ optional: true }) enabled?: boolean; + + @Optional() + @IsInt() + @IsPositive() + @ApiProperty({ type: 'integer' }) + duration?: number; } class RatingsUpdate { @@ -166,6 +172,9 @@ class RatingsResponse { class MemoriesResponse { enabled: boolean = true; + + @ApiProperty({ type: 'integer' }) + duration: number = 5; } class FoldersResponse { diff --git a/server/src/enum.ts b/server/src/enum.ts index 1c42d465ed..d86897d778 100644 --- a/server/src/enum.ts +++ b/server/src/enum.ts @@ -72,6 +72,14 @@ export enum MemoryType { OnThisDay = 'on_this_day', } +export enum AssetOrderWithRandom { + // Include existing values + Asc = AssetOrder.Asc, + Desc = AssetOrder.Desc, + /** Randomly Ordered */ + Random = 'random', +} + export enum Permission { All = 'all', @@ -772,3 +780,38 @@ export enum CronJob { LibraryScan = 'LibraryScan', NightlyJobs = 'NightlyJobs', } + +export enum ApiTag { + Activities = 'Activities', + Albums = 'Albums', + ApiKeys = 'API keys', + Authentication = 'Authentication', + AuthenticationAdmin = 'Authentication (admin)', + Assets = 'Assets', + Deprecated = 'Deprecated', + Download = 'Download', + Duplicates = 'Duplicates', + Faces = 'Faces', + Jobs = 'Jobs', + Libraries = 'Libraries', + Map = 'Map', + Memories = 'Memories', + Notifications = 'Notifications', + NotificationsAdmin = 'Notifications (admin)', + Partners = 'Partners', + People = 'People', + Search = 'Search', + Server = 'Server', + Sessions = 'Sessions', + SharedLinks = 'Shared links', + Stacks = 'Stacks', + Sync = 'Sync', + SystemConfig = 'System config', + SystemMetadata = 'System metadata', + Tags = 'Tags', + Timeline = 'Timeline', + Trash = 'Trash', + UsersAdmin = 'Users (admin)', + Users = 'Users', + Views = 'Views', +} diff --git a/server/src/queries/access.repository.sql b/server/src/queries/access.repository.sql index e98c5c6d98..9ce6d845da 100644 --- a/server/src/queries/access.repository.sql +++ b/server/src/queries/access.repository.sql @@ -25,8 +25,8 @@ select "album"."id" from "album" - left join "album_user" as "albumUsers" on "albumUsers"."albumsId" = "album"."id" - left join "user" on "user"."id" = "albumUsers"."usersId" + left join "album_user" as "albumUsers" on "albumUsers"."albumId" = "album"."id" + left join "user" on "user"."id" = "albumUsers"."userId" and "user"."deletedAt" is null where "album"."id" in ($1) @@ -52,8 +52,8 @@ select "album"."id" from "album" - left join "album_user" on "album_user"."albumsId" = "album"."id" - left join "user" on "user"."id" = "album_user"."usersId" + left join "album_user" on "album_user"."albumId" = "album"."id" + left join "user" on "user"."id" = "album_user"."userId" and "user"."deletedAt" is null where "album"."id" in ($1) @@ -81,11 +81,11 @@ select "asset"."livePhotoVideoId" from "album" - inner join "album_asset" as "albumAssets" on "album"."id" = "albumAssets"."albumsId" - inner join "asset" on "asset"."id" = "albumAssets"."assetsId" + inner join "album_asset" as "albumAssets" on "album"."id" = "albumAssets"."albumId" + inner join "asset" on "asset"."id" = "albumAssets"."assetId" and "asset"."deletedAt" is null - left join "album_user" as "albumUsers" on "albumUsers"."albumsId" = "album"."id" - left join "user" on "user"."id" = "albumUsers"."usersId" + left join "album_user" as "albumUsers" on "albumUsers"."albumId" = "album"."id" + left join "user" on "user"."id" = "albumUsers"."userId" and "user"."deletedAt" is null cross join "target" where @@ -136,11 +136,11 @@ from "shared_link" left join "album" on "album"."id" = "shared_link"."albumId" and "album"."deletedAt" is null - left join "shared_link_asset" on "shared_link_asset"."sharedLinksId" = "shared_link"."id" - left join "asset" on "asset"."id" = "shared_link_asset"."assetsId" + left join "shared_link_asset" on "shared_link_asset"."sharedLinkId" = "shared_link"."id" + left join "asset" on "asset"."id" = "shared_link_asset"."assetId" and "asset"."deletedAt" is null - left join "album_asset" on "album_asset"."albumsId" = "album"."id" - left join "asset" as "albumAssets" on "albumAssets"."id" = "album_asset"."assetsId" + left join "album_asset" on "album_asset"."albumId" = "album"."id" + left join "asset" as "albumAssets" on "albumAssets"."id" = "album_asset"."assetId" and "albumAssets"."deletedAt" is null where "shared_link"."id" = $1 diff --git a/server/src/queries/album.repository.sql b/server/src/queries/album.repository.sql index 1f4eda96a1..f62e769a17 100644 --- a/server/src/queries/album.repository.sql +++ b/server/src/queries/album.repository.sql @@ -43,13 +43,13 @@ select from "user" where - "user"."id" = "album_user"."usersId" + "user"."id" = "album_user"."userId" ) as obj ) as "user" from "album_user" where - "album_user"."albumsId" = "album"."id" + "album_user"."albumId" = "album"."id" ) as agg ) as "albumUsers", ( @@ -76,9 +76,9 @@ select from "asset" left join "asset_exif" on "asset"."id" = "asset_exif"."assetId" - inner join "album_asset" on "album_asset"."assetsId" = "asset"."id" + inner join "album_asset" on "album_asset"."assetId" = "asset"."id" where - "album_asset"."albumsId" = "album"."id" + "album_asset"."albumId" = "album"."id" and "asset"."deletedAt" is null and "asset"."visibility" in ('archive', 'timeline') order by @@ -134,18 +134,18 @@ select from "user" where - "user"."id" = "album_user"."usersId" + "user"."id" = "album_user"."userId" ) as obj ) as "user" from "album_user" where - "album_user"."albumsId" = "album"."id" + "album_user"."albumId" = "album"."id" ) as agg ) as "albumUsers" from "album" - inner join "album_asset" on "album_asset"."albumsId" = "album"."id" + inner join "album_asset" on "album_asset"."albumId" = "album"."id" where ( "album"."ownerId" = $1 @@ -154,11 +154,11 @@ where from "album_user" where - "album_user"."albumsId" = "album"."id" - and "album_user"."usersId" = $2 + "album_user"."albumId" = "album"."id" + and "album_user"."userId" = $2 ) ) - and "album_asset"."assetsId" = $3 + and "album_asset"."assetId" = $3 and "album"."deletedAt" is null order by "album"."createdAt" desc, @@ -166,7 +166,7 @@ order by -- AlbumRepository.getMetadataForIds select - "album_asset"."albumsId" as "albumId", + "album_asset"."albumId" as "albumId", min( ("asset"."localDateTime" AT TIME ZONE 'UTC'::text)::date ) as "startDate", @@ -177,13 +177,13 @@ select count("asset"."id")::int as "assetCount" from "asset" - inner join "album_asset" on "album_asset"."assetsId" = "asset"."id" + inner join "album_asset" on "album_asset"."assetId" = "asset"."id" where "asset"."visibility" in ('archive', 'timeline') - and "album_asset"."albumsId" in ($1) + and "album_asset"."albumId" in ($1) and "asset"."deletedAt" is null group by - "album_asset"."albumsId" + "album_asset"."albumId" -- AlbumRepository.getOwned select @@ -228,13 +228,13 @@ select from "user" where - "user"."id" = "album_user"."usersId" + "user"."id" = "album_user"."userId" ) as obj ) as "user" from "album_user" where - "album_user"."albumsId" = "album"."id" + "album_user"."albumId" = "album"."id" ) as agg ) as "albumUsers", ( @@ -283,13 +283,13 @@ select from "user" where - "user"."id" = "album_user"."usersId" + "user"."id" = "album_user"."userId" ) as obj ) as "user" from "album_user" where - "album_user"."albumsId" = "album"."id" + "album_user"."albumId" = "album"."id" ) as agg ) as "albumUsers", ( @@ -332,10 +332,10 @@ where from "album_user" where - "album_user"."albumsId" = "album"."id" + "album_user"."albumId" = "album"."id" and ( "album"."ownerId" = $1 - or "album_user"."usersId" = $2 + or "album_user"."userId" = $2 ) ) or exists ( @@ -382,7 +382,7 @@ where from "album_user" where - "album_user"."albumsId" = "album"."id" + "album_user"."albumId" = "album"."id" ) and not exists ( select @@ -397,7 +397,7 @@ order by -- AlbumRepository.removeAssetsFromAll delete from "album_asset" where - "album_asset"."assetsId" in ($1) + "album_asset"."assetId" in ($1) -- AlbumRepository.getAssetIds select @@ -405,8 +405,8 @@ select from "album_asset" where - "album_asset"."albumsId" = $1 - and "album_asset"."assetsId" in ($2) + "album_asset"."albumId" = $1 + and "album_asset"."assetId" in ($2) -- AlbumRepository.getContributorCounts select @@ -414,10 +414,10 @@ select count(*) as "assetCount" from "album_asset" - inner join "asset" on "asset"."id" = "assetsId" + inner join "asset" on "asset"."id" = "assetId" where "asset"."deletedAt" is null - and "album_asset"."albumsId" = $1 + and "album_asset"."albumId" = $1 group by "asset"."ownerId" order by @@ -427,10 +427,10 @@ order by insert into "album_asset" select - "album_asset"."albumsId", - $1 as "assetsId" + "album_asset"."albumId", + $1 as "assetId" from "album_asset" where - "album_asset"."assetsId" = $2 + "album_asset"."assetId" = $2 on conflict do nothing diff --git a/server/src/queries/album.user.repository.sql b/server/src/queries/album.user.repository.sql index e0fc0e7b74..a758ba1cf4 100644 --- a/server/src/queries/album.user.repository.sql +++ b/server/src/queries/album.user.repository.sql @@ -2,12 +2,12 @@ -- AlbumUserRepository.create insert into - "album_user" ("usersId", "albumsId") + "album_user" ("userId", "albumId") values ($1, $2) returning - "usersId", - "albumsId", + "userId", + "albumId", "role" -- AlbumUserRepository.update @@ -15,13 +15,13 @@ update "album_user" set "role" = $1 where - "usersId" = $2 - and "albumsId" = $3 + "userId" = $2 + and "albumId" = $3 returning * -- AlbumUserRepository.delete delete from "album_user" where - "usersId" = $1 - and "albumsId" = $2 + "userId" = $1 + and "albumId" = $2 diff --git a/server/src/queries/asset.job.repository.sql b/server/src/queries/asset.job.repository.sql index b55be413ea..ebfd1a08c9 100644 --- a/server/src/queries/asset.job.repository.sql +++ b/server/src/queries/asset.job.repository.sql @@ -31,9 +31,9 @@ select "tag"."value" from "tag" - inner join "tag_asset" on "tag"."id" = "tag_asset"."tagsId" + inner join "tag_asset" on "tag"."id" = "tag_asset"."tagId" where - "asset"."id" = "tag_asset"."assetsId" + "asset"."id" = "tag_asset"."assetId" ) as agg ) as "tags" from diff --git a/server/src/queries/asset.repository.sql b/server/src/queries/asset.repository.sql index e3a0eb8c06..23fd3caf3c 100644 --- a/server/src/queries/asset.repository.sql +++ b/server/src/queries/asset.repository.sql @@ -160,9 +160,9 @@ select "tag"."parentId" from "tag" - inner join "tag_asset" on "tag"."id" = "tag_asset"."tagsId" + inner join "tag_asset" on "tag"."id" = "tag_asset"."tagId" where - "asset"."id" = "tag_asset"."assetsId" + "asset"."id" = "tag_asset"."assetId" ) as agg ) as "tags", to_json("asset_exif") as "exifInfo" diff --git a/server/src/queries/map.repository.sql b/server/src/queries/map.repository.sql index df2136a422..d7e98b1cd2 100644 --- a/server/src/queries/map.repository.sql +++ b/server/src/queries/map.repository.sql @@ -23,8 +23,8 @@ where from "album_asset" where - "asset"."id" = "album_asset"."assetsId" - and "album_asset"."albumsId" in ($3) + "asset"."id" = "album_asset"."assetId" + and "album_asset"."albumId" in ($3) ) ) order by diff --git a/server/src/queries/memory.repository.sql b/server/src/queries/memory.repository.sql index b3cc7240ae..da970c2c78 100644 --- a/server/src/queries/memory.repository.sql +++ b/server/src/queries/memory.repository.sql @@ -37,7 +37,7 @@ select "asset".* from "asset" - inner join "memory_asset" on "asset"."id" = "memory_asset"."assetsId" + inner join "memory_asset" on "asset"."id" = "memory_asset"."assetId" where "memory_asset"."memoriesId" = "memory"."id" and "asset"."visibility" = 'timeline' @@ -66,7 +66,7 @@ select "asset".* from "asset" - inner join "memory_asset" on "asset"."id" = "memory_asset"."assetsId" + inner join "memory_asset" on "asset"."id" = "memory_asset"."assetId" where "memory_asset"."memoriesId" = "memory"."id" and "asset"."visibility" = 'timeline' @@ -104,7 +104,7 @@ select "asset".* from "asset" - inner join "memory_asset" on "asset"."id" = "memory_asset"."assetsId" + inner join "memory_asset" on "asset"."id" = "memory_asset"."assetId" where "memory_asset"."memoriesId" = "memory"."id" and "asset"."visibility" = 'timeline' @@ -137,7 +137,7 @@ select "asset".* from "asset" - inner join "memory_asset" on "asset"."id" = "memory_asset"."assetsId" + inner join "memory_asset" on "asset"."id" = "memory_asset"."assetId" where "memory_asset"."memoriesId" = "memory"."id" and "asset"."visibility" = 'timeline' @@ -159,15 +159,15 @@ where -- MemoryRepository.getAssetIds select - "assetsId" + "assetId" from "memory_asset" where "memoriesId" = $1 - and "assetsId" in ($2) + and "assetId" in ($2) -- MemoryRepository.addAssetIds insert into - "memory_asset" ("memoriesId", "assetsId") + "memory_asset" ("memoriesId", "assetId") values ($1, $2) diff --git a/server/src/queries/shared.link.asset.repository.sql b/server/src/queries/shared.link.asset.repository.sql index 7acee50812..7f9ebc03d1 100644 --- a/server/src/queries/shared.link.asset.repository.sql +++ b/server/src/queries/shared.link.asset.repository.sql @@ -4,10 +4,10 @@ insert into "shared_link_asset" select - $1 as "assetsId", - "shared_link_asset"."sharedLinksId" + $1 as "assetId", + "shared_link_asset"."sharedLinkId" from "shared_link_asset" where - "shared_link_asset"."assetsId" = $2 + "shared_link_asset"."assetId" = $2 on conflict do nothing diff --git a/server/src/queries/shared.link.repository.sql b/server/src/queries/shared.link.repository.sql index 0f46846c14..8540da91c8 100644 --- a/server/src/queries/shared.link.repository.sql +++ b/server/src/queries/shared.link.repository.sql @@ -19,7 +19,7 @@ from to_json("exifInfo") as "exifInfo" from "shared_link_asset" - inner join "asset" on "asset"."id" = "shared_link_asset"."assetsId" + inner join "asset" on "asset"."id" = "shared_link_asset"."assetId" inner join lateral ( select "asset_exif".* @@ -29,7 +29,7 @@ from "asset_exif"."assetId" = "asset"."id" ) as "exifInfo" on true where - "shared_link"."id" = "shared_link_asset"."sharedLinksId" + "shared_link"."id" = "shared_link_asset"."sharedLinkId" and "asset"."deletedAt" is null order by "asset"."fileCreatedAt" asc @@ -51,7 +51,7 @@ from to_json("owner") as "owner" from "album" - left join "album_asset" on "album_asset"."albumsId" = "album"."id" + left join "album_asset" on "album_asset"."albumId" = "album"."id" left join lateral ( select "asset".*, @@ -67,7 +67,7 @@ from "asset_exif"."assetId" = "asset"."id" ) as "exifInfo" on true where - "album_asset"."assetsId" = "asset"."id" + "album_asset"."assetId" = "asset"."id" and "asset"."deletedAt" is null order by "asset"."fileCreatedAt" asc @@ -108,14 +108,14 @@ select distinct to_json("album") as "album" from "shared_link" - left join "shared_link_asset" on "shared_link_asset"."sharedLinksId" = "shared_link"."id" + left join "shared_link_asset" on "shared_link_asset"."sharedLinkId" = "shared_link"."id" left join lateral ( select json_agg("asset") as "assets" from "asset" where - "asset"."id" = "shared_link_asset"."assetsId" + "asset"."id" = "shared_link_asset"."assetId" and "asset"."deletedAt" is null ) as "assets" on true left join lateral ( diff --git a/server/src/queries/stack.repository.sql b/server/src/queries/stack.repository.sql index 0bfb5df2fb..64714e5665 100644 --- a/server/src/queries/stack.repository.sql +++ b/server/src/queries/stack.repository.sql @@ -89,9 +89,9 @@ select "tag"."parentId" from "tag" - inner join "tag_asset" on "tag"."id" = "tag_asset"."tagsId" + inner join "tag_asset" on "tag"."id" = "tag_asset"."tagId" where - "tag_asset"."assetsId" = "asset"."id" + "tag_asset"."assetId" = "asset"."id" ) as agg ) as "tags", to_json("exifInfo") as "exifInfo" diff --git a/server/src/queries/sync.repository.sql b/server/src/queries/sync.repository.sql index 809b59df10..7c1dc3b6b4 100644 --- a/server/src/queries/sync.repository.sql +++ b/server/src/queries/sync.repository.sql @@ -2,12 +2,12 @@ -- SyncRepository.album.getCreatedAfter select - "albumsId" as "id", + "albumId" as "id", "createId" from "album_user" where - "usersId" = $1 + "userId" = $1 and "createId" >= $2 and "createId" < $3 order by @@ -40,13 +40,13 @@ select distinct "album"."updateId" from "album" as "album" - left join "album_user" as "album_users" on "album"."id" = "album_users"."albumsId" + left join "album_user" as "album_users" on "album"."id" = "album_users"."albumId" where "album"."updateId" < $1 and "album"."updateId" > $2 and ( "album"."ownerId" = $3 - or "album_users"."usersId" = $4 + or "album_users"."userId" = $4 ) order by "album"."updateId" asc @@ -72,12 +72,12 @@ select "album_asset"."updateId" from "album_asset" as "album_asset" - inner join "asset" on "asset"."id" = "album_asset"."assetsId" + inner join "asset" on "asset"."id" = "album_asset"."assetId" where "album_asset"."updateId" < $1 and "album_asset"."updateId" <= $2 and "album_asset"."updateId" >= $3 - and "album_asset"."albumsId" = $4 + and "album_asset"."albumId" = $4 order by "album_asset"."updateId" asc @@ -102,16 +102,16 @@ select "asset"."updateId" from "asset" as "asset" - inner join "album_asset" on "album_asset"."assetsId" = "asset"."id" - inner join "album" on "album"."id" = "album_asset"."albumsId" - left join "album_user" on "album_user"."albumsId" = "album_asset"."albumsId" + inner join "album_asset" on "album_asset"."assetId" = "asset"."id" + inner join "album" on "album"."id" = "album_asset"."albumId" + left join "album_user" on "album_user"."albumId" = "album_asset"."albumId" where "asset"."updateId" < $1 and "asset"."updateId" > $2 and "album_asset"."updateId" <= $3 and ( "album"."ownerId" = $4 - or "album_user"."usersId" = $5 + or "album_user"."userId" = $5 ) order by "asset"."updateId" asc @@ -137,15 +137,15 @@ select "asset"."libraryId" from "album_asset" as "album_asset" - inner join "asset" on "asset"."id" = "album_asset"."assetsId" - inner join "album" on "album"."id" = "album_asset"."albumsId" - left join "album_user" on "album_user"."albumsId" = "album_asset"."albumsId" + inner join "asset" on "asset"."id" = "album_asset"."assetId" + inner join "album" on "album"."id" = "album_asset"."albumId" + left join "album_user" on "album_user"."albumId" = "album_asset"."albumId" where "album_asset"."updateId" < $1 and "album_asset"."updateId" > $2 and ( "album"."ownerId" = $3 - or "album_user"."usersId" = $4 + or "album_user"."userId" = $4 ) order by "album_asset"."updateId" asc @@ -180,12 +180,12 @@ select "album_asset"."updateId" from "album_asset" as "album_asset" - inner join "asset_exif" on "asset_exif"."assetId" = "album_asset"."assetsId" + inner join "asset_exif" on "asset_exif"."assetId" = "album_asset"."assetId" where "album_asset"."updateId" < $1 and "album_asset"."updateId" <= $2 and "album_asset"."updateId" >= $3 - and "album_asset"."albumsId" = $4 + and "album_asset"."albumId" = $4 order by "album_asset"."updateId" asc @@ -219,16 +219,16 @@ select "asset_exif"."updateId" from "asset_exif" as "asset_exif" - inner join "album_asset" on "album_asset"."assetsId" = "asset_exif"."assetId" - inner join "album" on "album"."id" = "album_asset"."albumsId" - left join "album_user" on "album_user"."albumsId" = "album_asset"."albumsId" + inner join "album_asset" on "album_asset"."assetId" = "asset_exif"."assetId" + inner join "album" on "album"."id" = "album_asset"."albumId" + left join "album_user" on "album_user"."albumId" = "album_asset"."albumId" where "asset_exif"."updateId" < $1 and "asset_exif"."updateId" > $2 and "album_asset"."updateId" <= $3 and ( "album"."ownerId" = $4 - or "album_user"."usersId" = $5 + or "album_user"."userId" = $5 ) order by "asset_exif"."updateId" asc @@ -263,23 +263,23 @@ select "asset_exif"."fps" from "album_asset" as "album_asset" - inner join "asset_exif" on "asset_exif"."assetId" = "album_asset"."assetsId" - inner join "album" on "album"."id" = "album_asset"."albumsId" - left join "album_user" on "album_user"."albumsId" = "album_asset"."albumsId" + inner join "asset_exif" on "asset_exif"."assetId" = "album_asset"."assetId" + inner join "album" on "album"."id" = "album_asset"."albumId" + left join "album_user" on "album_user"."albumId" = "album_asset"."albumId" where "album_asset"."updateId" < $1 and "album_asset"."updateId" > $2 and ( "album"."ownerId" = $3 - or "album_user"."usersId" = $4 + or "album_user"."userId" = $4 ) order by "album_asset"."updateId" asc -- SyncRepository.albumToAsset.getBackfill select - "album_asset"."assetsId" as "assetId", - "album_asset"."albumsId" as "albumId", + "album_asset"."assetId" as "assetId", + "album_asset"."albumId" as "albumId", "album_asset"."updateId" from "album_asset" as "album_asset" @@ -287,7 +287,7 @@ where "album_asset"."updateId" < $1 and "album_asset"."updateId" <= $2 and "album_asset"."updateId" >= $3 - and "album_asset"."albumsId" = $4 + and "album_asset"."albumId" = $4 order by "album_asset"."updateId" asc @@ -311,11 +311,11 @@ where union ( select - "album_user"."albumsId" as "id" + "album_user"."albumId" as "id" from "album_user" where - "album_user"."usersId" = $4 + "album_user"."userId" = $4 ) ) order by @@ -323,27 +323,27 @@ order by -- SyncRepository.albumToAsset.getUpserts select - "album_asset"."assetsId" as "assetId", - "album_asset"."albumsId" as "albumId", + "album_asset"."assetId" as "assetId", + "album_asset"."albumId" as "albumId", "album_asset"."updateId" from "album_asset" as "album_asset" - inner join "album" on "album"."id" = "album_asset"."albumsId" - left join "album_user" on "album_user"."albumsId" = "album_asset"."albumsId" + inner join "album" on "album"."id" = "album_asset"."albumId" + left join "album_user" on "album_user"."albumId" = "album_asset"."albumId" where "album_asset"."updateId" < $1 and "album_asset"."updateId" > $2 and ( "album"."ownerId" = $3 - or "album_user"."usersId" = $4 + or "album_user"."userId" = $4 ) order by "album_asset"."updateId" asc -- SyncRepository.albumUser.getBackfill select - "album_user"."albumsId" as "albumId", - "album_user"."usersId" as "userId", + "album_user"."albumId" as "albumId", + "album_user"."userId" as "userId", "album_user"."role", "album_user"."updateId" from @@ -352,7 +352,7 @@ where "album_user"."updateId" < $1 and "album_user"."updateId" <= $2 and "album_user"."updateId" >= $3 - and "albumsId" = $4 + and "albumId" = $4 order by "album_user"."updateId" asc @@ -376,11 +376,11 @@ where union ( select - "album_user"."albumsId" as "id" + "album_user"."albumId" as "id" from "album_user" where - "album_user"."usersId" = $4 + "album_user"."userId" = $4 ) ) order by @@ -388,8 +388,8 @@ order by -- SyncRepository.albumUser.getUpserts select - "album_user"."albumsId" as "albumId", - "album_user"."usersId" as "userId", + "album_user"."albumId" as "albumId", + "album_user"."userId" as "userId", "album_user"."role", "album_user"."updateId" from @@ -397,7 +397,7 @@ from where "album_user"."updateId" < $1 and "album_user"."updateId" > $2 - and "album_user"."albumsId" in ( + and "album_user"."albumId" in ( select "id" from @@ -407,11 +407,11 @@ where union ( select - "albumUsers"."albumsId" as "id" + "albumUsers"."albumId" as "id" from "album_user" as "albumUsers" where - "albumUsers"."usersId" = $4 + "albumUsers"."userId" = $4 ) ) order by @@ -656,7 +656,7 @@ order by -- SyncRepository.memoryToAsset.getUpserts select "memoriesId" as "memoryId", - "assetsId" as "assetId", + "assetId" as "assetId", "updateId" from "memory_asset" as "memory_asset" diff --git a/server/src/queries/tag.repository.sql b/server/src/queries/tag.repository.sql index ee961f3801..c3b46dd9f3 100644 --- a/server/src/queries/tag.repository.sql +++ b/server/src/queries/tag.repository.sql @@ -84,19 +84,19 @@ where -- TagRepository.addAssetIds insert into - "tag_asset" ("tagsId", "assetsId") + "tag_asset" ("tagId", "assetId") values ($1, $2) -- TagRepository.removeAssetIds delete from "tag_asset" where - "tagsId" = $1 - and "assetsId" in ($2) + "tagId" = $1 + and "assetId" in ($2) -- TagRepository.upsertAssetIds insert into - "tag_asset" ("assetId", "tagsIds") + "tag_asset" ("assetId", "tagIds") values ($1, $2) on conflict do nothing @@ -107,9 +107,9 @@ returning begin delete from "tag_asset" where - "assetsId" = $1 + "assetId" = $1 insert into - "tag_asset" ("tagsId", "assetsId") + "tag_asset" ("tagId", "assetId") values ($1, $2) on conflict do nothing diff --git a/server/src/repositories/access.repository.ts b/server/src/repositories/access.repository.ts index ca12ff040b..a801c046aa 100644 --- a/server/src/repositories/access.repository.ts +++ b/server/src/repositories/access.repository.ts @@ -52,8 +52,8 @@ class ActivityAccess { return this.db .selectFrom('album') .select('album.id') - .leftJoin('album_user as albumUsers', 'albumUsers.albumsId', 'album.id') - .leftJoin('user', (join) => join.onRef('user.id', '=', 'albumUsers.usersId').on('user.deletedAt', 'is', null)) + .leftJoin('album_user as albumUsers', 'albumUsers.albumId', 'album.id') + .leftJoin('user', (join) => join.onRef('user.id', '=', 'albumUsers.userId').on('user.deletedAt', 'is', null)) .where('album.id', 'in', [...albumIds]) .where('album.isActivityEnabled', '=', true) .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('user.id', '=', userId)])) @@ -96,8 +96,8 @@ class AlbumAccess { return this.db .selectFrom('album') .select('album.id') - .leftJoin('album_user', 'album_user.albumsId', 'album.id') - .leftJoin('user', (join) => join.onRef('user.id', '=', 'album_user.usersId').on('user.deletedAt', 'is', null)) + .leftJoin('album_user', 'album_user.albumId', 'album.id') + .leftJoin('user', (join) => join.onRef('user.id', '=', 'album_user.userId').on('user.deletedAt', 'is', null)) .where('album.id', 'in', [...albumIds]) .where('album.deletedAt', 'is', null) .where('user.id', '=', userId) @@ -138,12 +138,12 @@ class AssetAccess { return this.db .with('target', (qb) => qb.selectNoFrom(sql`array[${sql.join([...assetIds])}]::uuid[]`.as('ids'))) .selectFrom('album') - .innerJoin('album_asset as albumAssets', 'album.id', 'albumAssets.albumsId') + .innerJoin('album_asset as albumAssets', 'album.id', 'albumAssets.albumId') .innerJoin('asset', (join) => - join.onRef('asset.id', '=', 'albumAssets.assetsId').on('asset.deletedAt', 'is', null), + join.onRef('asset.id', '=', 'albumAssets.assetId').on('asset.deletedAt', 'is', null), ) - .leftJoin('album_user as albumUsers', 'albumUsers.albumsId', 'album.id') - .leftJoin('user', (join) => join.onRef('user.id', '=', 'albumUsers.usersId').on('user.deletedAt', 'is', null)) + .leftJoin('album_user as albumUsers', 'albumUsers.albumId', 'album.id') + .leftJoin('user', (join) => join.onRef('user.id', '=', 'albumUsers.userId').on('user.deletedAt', 'is', null)) .crossJoin('target') .select(['asset.id', 'asset.livePhotoVideoId']) .where((eb) => @@ -223,13 +223,13 @@ class AssetAccess { return this.db .selectFrom('shared_link') .leftJoin('album', (join) => join.onRef('album.id', '=', 'shared_link.albumId').on('album.deletedAt', 'is', null)) - .leftJoin('shared_link_asset', 'shared_link_asset.sharedLinksId', 'shared_link.id') + .leftJoin('shared_link_asset', 'shared_link_asset.sharedLinkId', 'shared_link.id') .leftJoin('asset', (join) => - join.onRef('asset.id', '=', 'shared_link_asset.assetsId').on('asset.deletedAt', 'is', null), + join.onRef('asset.id', '=', 'shared_link_asset.assetId').on('asset.deletedAt', 'is', null), ) - .leftJoin('album_asset', 'album_asset.albumsId', 'album.id') + .leftJoin('album_asset', 'album_asset.albumId', 'album.id') .leftJoin('asset as albumAssets', (join) => - join.onRef('albumAssets.id', '=', 'album_asset.assetsId').on('albumAssets.deletedAt', 'is', null), + join.onRef('albumAssets.id', '=', 'album_asset.assetId').on('albumAssets.deletedAt', 'is', null), ) .select([ 'asset.id as assetId', diff --git a/server/src/repositories/album-user.repository.ts b/server/src/repositories/album-user.repository.ts index 2fce797aff..1a1e58a77d 100644 --- a/server/src/repositories/album-user.repository.ts +++ b/server/src/repositories/album-user.repository.ts @@ -7,36 +7,36 @@ import { DB } from 'src/schema'; import { AlbumUserTable } from 'src/schema/tables/album-user.table'; export type AlbumPermissionId = { - albumsId: string; - usersId: string; + albumId: string; + userId: string; }; @Injectable() export class AlbumUserRepository { constructor(@InjectKysely() private db: Kysely) {} - @GenerateSql({ params: [{ usersId: DummyValue.UUID, albumsId: DummyValue.UUID }] }) + @GenerateSql({ params: [{ userId: DummyValue.UUID, albumId: DummyValue.UUID }] }) create(albumUser: Insertable) { return this.db .insertInto('album_user') .values(albumUser) - .returning(['usersId', 'albumsId', 'role']) + .returning(['userId', 'albumId', 'role']) .executeTakeFirstOrThrow(); } - @GenerateSql({ params: [{ usersId: DummyValue.UUID, albumsId: DummyValue.UUID }, { role: AlbumUserRole.Viewer }] }) - update({ usersId, albumsId }: AlbumPermissionId, dto: Updateable) { + @GenerateSql({ params: [{ userId: DummyValue.UUID, albumId: DummyValue.UUID }, { role: AlbumUserRole.Viewer }] }) + update({ userId, albumId }: AlbumPermissionId, dto: Updateable) { return this.db .updateTable('album_user') .set(dto) - .where('usersId', '=', usersId) - .where('albumsId', '=', albumsId) + .where('userId', '=', userId) + .where('albumId', '=', albumId) .returningAll() .executeTakeFirstOrThrow(); } - @GenerateSql({ params: [{ usersId: DummyValue.UUID, albumsId: DummyValue.UUID }] }) - async delete({ usersId, albumsId }: AlbumPermissionId): Promise { - await this.db.deleteFrom('album_user').where('usersId', '=', usersId).where('albumsId', '=', albumsId).execute(); + @GenerateSql({ params: [{ userId: DummyValue.UUID, albumId: DummyValue.UUID }] }) + async delete({ userId, albumId }: AlbumPermissionId): Promise { + await this.db.deleteFrom('album_user').where('userId', '=', userId).where('albumId', '=', albumId).execute(); } } diff --git a/server/src/repositories/album.repository.ts b/server/src/repositories/album.repository.ts index f5bfe44efe..100ab908c0 100644 --- a/server/src/repositories/album.repository.ts +++ b/server/src/repositories/album.repository.ts @@ -33,11 +33,11 @@ const withAlbumUsers = (eb: ExpressionBuilder) => { .selectFrom('album_user') .select('album_user.role') .select((eb) => - jsonObjectFrom(eb.selectFrom('user').select(columns.user).whereRef('user.id', '=', 'album_user.usersId')) + jsonObjectFrom(eb.selectFrom('user').select(columns.user).whereRef('user.id', '=', 'album_user.userId')) .$notNull() .as('user'), ) - .whereRef('album_user.albumsId', '=', 'album.id'), + .whereRef('album_user.albumId', '=', 'album.id'), ) .$notNull() .as('albumUsers'); @@ -57,8 +57,8 @@ const withAssets = (eb: ExpressionBuilder) => { .selectAll('asset') .leftJoin('asset_exif', 'asset.id', 'asset_exif.assetId') .select((eb) => eb.table('asset_exif').$castTo().as('exifInfo')) - .innerJoin('album_asset', 'album_asset.assetsId', 'asset.id') - .whereRef('album_asset.albumsId', '=', 'album.id') + .innerJoin('album_asset', 'album_asset.assetId', 'asset.id') + .whereRef('album_asset.albumId', '=', 'album.id') .where('asset.deletedAt', 'is', null) .$call(withDefaultVisibility) .orderBy('asset.fileCreatedAt', 'desc') @@ -92,19 +92,19 @@ export class AlbumRepository { return this.db .selectFrom('album') .selectAll('album') - .innerJoin('album_asset', 'album_asset.albumsId', 'album.id') + .innerJoin('album_asset', 'album_asset.albumId', 'album.id') .where((eb) => eb.or([ eb('album.ownerId', '=', ownerId), eb.exists( eb .selectFrom('album_user') - .whereRef('album_user.albumsId', '=', 'album.id') - .where('album_user.usersId', '=', ownerId), + .whereRef('album_user.albumId', '=', 'album.id') + .where('album_user.userId', '=', ownerId), ), ]), ) - .where('album_asset.assetsId', '=', assetId) + .where('album_asset.assetId', '=', assetId) .where('album.deletedAt', 'is', null) .orderBy('album.createdAt', 'desc') .select(withOwner) @@ -125,16 +125,16 @@ export class AlbumRepository { this.db .selectFrom('asset') .$call(withDefaultVisibility) - .innerJoin('album_asset', 'album_asset.assetsId', 'asset.id') - .select('album_asset.albumsId as albumId') + .innerJoin('album_asset', 'album_asset.assetId', 'asset.id') + .select('album_asset.albumId as albumId') .select((eb) => eb.fn.min(sql`("asset"."localDateTime" AT TIME ZONE 'UTC'::text)::date`).as('startDate')) .select((eb) => eb.fn.max(sql`("asset"."localDateTime" AT TIME ZONE 'UTC'::text)::date`).as('endDate')) // lastModifiedAssetTimestamp is only used in mobile app, please remove if not need .select((eb) => eb.fn.max('asset.updatedAt').as('lastModifiedAssetTimestamp')) .select((eb) => sql`${eb.fn.count('asset.id')}::int`.as('assetCount')) - .where('album_asset.albumsId', 'in', ids) + .where('album_asset.albumId', 'in', ids) .where('asset.deletedAt', 'is', null) - .groupBy('album_asset.albumsId') + .groupBy('album_asset.albumId') .execute() ); } @@ -166,8 +166,8 @@ export class AlbumRepository { eb.exists( eb .selectFrom('album_user') - .whereRef('album_user.albumsId', '=', 'album.id') - .where((eb) => eb.or([eb('album.ownerId', '=', ownerId), eb('album_user.usersId', '=', ownerId)])), + .whereRef('album_user.albumId', '=', 'album.id') + .where((eb) => eb.or([eb('album.ownerId', '=', ownerId), eb('album_user.userId', '=', ownerId)])), ), eb.exists( eb @@ -195,7 +195,7 @@ export class AlbumRepository { .selectAll('album') .where('album.ownerId', '=', ownerId) .where('album.deletedAt', 'is', null) - .where((eb) => eb.not(eb.exists(eb.selectFrom('album_user').whereRef('album_user.albumsId', '=', 'album.id')))) + .where((eb) => eb.not(eb.exists(eb.selectFrom('album_user').whereRef('album_user.albumId', '=', 'album.id')))) .where((eb) => eb.not(eb.exists(eb.selectFrom('shared_link').whereRef('shared_link.albumId', '=', 'album.id')))) .select(withOwner) .orderBy('album.createdAt', 'desc') @@ -217,7 +217,7 @@ export class AlbumRepository { @GenerateSql({ params: [[DummyValue.UUID]] }) @Chunked() async removeAssetsFromAll(assetIds: string[]): Promise { - await this.db.deleteFrom('album_asset').where('album_asset.assetsId', 'in', assetIds).execute(); + await this.db.deleteFrom('album_asset').where('album_asset.assetId', 'in', assetIds).execute(); } @Chunked({ paramIndex: 1 }) @@ -228,8 +228,8 @@ export class AlbumRepository { await this.db .deleteFrom('album_asset') - .where('album_asset.albumsId', '=', albumId) - .where('album_asset.assetsId', 'in', assetIds) + .where('album_asset.albumId', '=', albumId) + .where('album_asset.assetId', 'in', assetIds) .execute(); } @@ -250,10 +250,10 @@ export class AlbumRepository { return this.db .selectFrom('album_asset') .selectAll() - .where('album_asset.albumsId', '=', albumId) - .where('album_asset.assetsId', 'in', assetIds) + .where('album_asset.albumId', '=', albumId) + .where('album_asset.assetId', 'in', assetIds) .execute() - .then((results) => new Set(results.map(({ assetsId }) => assetsId))); + .then((results) => new Set(results.map(({ assetId }) => assetId))); } async addAssetIds(albumId: string, assetIds: string[]): Promise { @@ -276,7 +276,7 @@ export class AlbumRepository { await tx .insertInto('album_user') .values( - albumUsers.map((albumUser) => ({ albumsId: newAlbum.id, usersId: albumUser.userId, role: albumUser.role })), + albumUsers.map((albumUser) => ({ albumId: newAlbum.id, userId: albumUser.userId, role: albumUser.role })), ) .execute(); } @@ -317,12 +317,12 @@ export class AlbumRepository { await db .insertInto('album_asset') - .values(assetIds.map((assetId) => ({ albumsId: albumId, assetsId: assetId }))) + .values(assetIds.map((assetId) => ({ albumId, assetId }))) .execute(); } @Chunked({ chunkSize: 30_000 }) - async addAssetIdsToAlbums(values: { albumsId: string; assetsId: string }[]): Promise { + async addAssetIdsToAlbums(values: { albumId: string; assetId: string }[]): Promise { if (values.length === 0) { return; } @@ -344,7 +344,7 @@ export class AlbumRepository { .updateTable('album') .set((eb) => ({ albumThumbnailAssetId: this.updateThumbnailBuilder(eb) - .select('album_asset.assetsId') + .select('album_asset.assetId') .orderBy('asset.fileCreatedAt', 'desc') .limit(1), })) @@ -360,7 +360,7 @@ export class AlbumRepository { eb.exists( this.updateThumbnailBuilder(eb) .select(sql`1`.as('1')) - .whereRef('album.albumThumbnailAssetId', '=', 'album_asset.assetsId'), // Has invalid assets + .whereRef('album.albumThumbnailAssetId', '=', 'album_asset.assetId'), // Has invalid assets ), ), ]), @@ -375,9 +375,9 @@ export class AlbumRepository { return eb .selectFrom('album_asset') .innerJoin('asset', (join) => - join.onRef('album_asset.assetsId', '=', 'asset.id').on('asset.deletedAt', 'is', null), + join.onRef('album_asset.assetId', '=', 'asset.id').on('asset.deletedAt', 'is', null), ) - .whereRef('album_asset.albumsId', '=', 'album.id'); + .whereRef('album_asset.albumId', '=', 'album.id'); } /** @@ -388,9 +388,9 @@ export class AlbumRepository { getContributorCounts(id: string) { return this.db .selectFrom('album_asset') - .innerJoin('asset', 'asset.id', 'assetsId') + .innerJoin('asset', 'asset.id', 'assetId') .where('asset.deletedAt', 'is', sql.lit(null)) - .where('album_asset.albumsId', '=', id) + .where('album_asset.albumId', '=', id) .select('asset.ownerId as userId') .select((eb) => eb.fn.countAll().as('assetCount')) .groupBy('asset.ownerId') @@ -405,8 +405,8 @@ export class AlbumRepository { .expression((eb) => eb .selectFrom('album_asset') - .select((eb) => ['album_asset.albumsId', eb.val(targetAssetId).as('assetsId')]) - .where('album_asset.assetsId', '=', sourceAssetId), + .select((eb) => ['album_asset.albumId', eb.val(targetAssetId).as('assetId')]) + .where('album_asset.assetId', '=', sourceAssetId), ) .onConflict((oc) => oc.doNothing()) .execute(); diff --git a/server/src/repositories/asset-job.repository.ts b/server/src/repositories/asset-job.repository.ts index 6094708d1b..8d54e93c87 100644 --- a/server/src/repositories/asset-job.repository.ts +++ b/server/src/repositories/asset-job.repository.ts @@ -46,8 +46,8 @@ export class AssetJobRepository { eb .selectFrom('tag') .select(['tag.value']) - .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagsId') - .whereRef('asset.id', '=', 'tag_asset.assetsId'), + .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagId') + .whereRef('asset.id', '=', 'tag_asset.assetId'), ).as('tags'), ) .limit(1) diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts index c4227e6412..8e793f9603 100644 --- a/server/src/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -563,8 +563,8 @@ export class AssetRepository { .$if(!!options.visibility, (qb) => qb.where('asset.visibility', '=', options.visibility!)) .$if(!!options.albumId, (qb) => qb - .innerJoin('album_asset', 'asset.id', 'album_asset.assetsId') - .where('album_asset.albumsId', '=', asUuid(options.albumId!)), + .innerJoin('album_asset', 'asset.id', 'album_asset.assetId') + .where('album_asset.albumId', '=', asUuid(options.albumId!)), ) .$if(!!options.personId, (qb) => hasPeople(qb, [options.personId!])) .$if(!!options.withStacked, (qb) => @@ -641,8 +641,8 @@ export class AssetRepository { eb.exists( eb .selectFrom('album_asset') - .whereRef('album_asset.assetsId', '=', 'asset.id') - .where('album_asset.albumsId', '=', asUuid(options.albumId!)), + .whereRef('album_asset.assetId', '=', 'asset.id') + .where('album_asset.albumId', '=', asUuid(options.albumId!)), ), ), ) diff --git a/server/src/repositories/download.repository.ts b/server/src/repositories/download.repository.ts index ecc1e4d3ab..61a0f23d5e 100644 --- a/server/src/repositories/download.repository.ts +++ b/server/src/repositories/download.repository.ts @@ -26,8 +26,8 @@ export class DownloadRepository { downloadAlbumId(albumId: string) { return builder(this.db) - .innerJoin('album_asset', 'asset.id', 'album_asset.assetsId') - .where('album_asset.albumsId', '=', albumId) + .innerJoin('album_asset', 'asset.id', 'album_asset.assetId') + .where('album_asset.albumId', '=', albumId) .stream(); } diff --git a/server/src/repositories/map.repository.ts b/server/src/repositories/map.repository.ts index 7f6e2a967a..304cf89c32 100644 --- a/server/src/repositories/map.repository.ts +++ b/server/src/repositories/map.repository.ts @@ -126,8 +126,8 @@ export class MapRepository { eb.exists((eb) => eb .selectFrom('album_asset') - .whereRef('asset.id', '=', 'album_asset.assetsId') - .where('album_asset.albumsId', 'in', albumIds), + .whereRef('asset.id', '=', 'album_asset.assetId') + .where('album_asset.albumId', 'in', albumIds), ), ); } diff --git a/server/src/repositories/memory.repository.ts b/server/src/repositories/memory.repository.ts index 65b4cb3df7..e62c083839 100644 --- a/server/src/repositories/memory.repository.ts +++ b/server/src/repositories/memory.repository.ts @@ -1,11 +1,11 @@ import { Injectable } from '@nestjs/common'; -import { Insertable, Kysely, sql, Updateable } from 'kysely'; +import { Insertable, Kysely, OrderByDirection, sql, Updateable } from 'kysely'; import { jsonArrayFrom } from 'kysely/helpers/postgres'; import { DateTime } from 'luxon'; import { InjectKysely } from 'nestjs-kysely'; import { Chunked, ChunkedSet, DummyValue, GenerateSql } from 'src/decorators'; import { MemorySearchDto } from 'src/dtos/memory.dto'; -import { AssetVisibility } from 'src/enum'; +import { AssetOrderWithRandom, AssetVisibility } from 'src/enum'; import { DB } from 'src/schema'; import { MemoryTable } from 'src/schema/tables/memory.table'; import { IBulkAsset } from 'src/types'; @@ -18,7 +18,7 @@ export class MemoryRepository implements IBulkAsset { await this.db .deleteFrom('memory_asset') .using('asset') - .whereRef('memory_asset.assetsId', '=', 'asset.id') + .whereRef('memory_asset.assetId', '=', 'asset.id') .where('asset.visibility', '!=', AssetVisibility.Timeline) .execute(); @@ -64,7 +64,7 @@ export class MemoryRepository implements IBulkAsset { eb .selectFrom('asset') .selectAll('asset') - .innerJoin('memory_asset', 'asset.id', 'memory_asset.assetsId') + .innerJoin('memory_asset', 'asset.id', 'memory_asset.assetId') .whereRef('memory_asset.memoriesId', '=', 'memory.id') .orderBy('asset.fileCreatedAt', 'asc') .where('asset.visibility', '=', sql.lit(AssetVisibility.Timeline)) @@ -72,7 +72,12 @@ export class MemoryRepository implements IBulkAsset { ).as('assets'), ) .selectAll('memory') - .orderBy('memoryAt', 'desc') + .$call((qb) => + dto.order === AssetOrderWithRandom.Random + ? qb.orderBy(sql`RANDOM()`) + : qb.orderBy('memoryAt', (dto.order?.toLowerCase() || 'desc') as OrderByDirection), + ) + .$if(dto.size !== undefined, (qb) => qb.limit(dto.size!)) .execute(); } @@ -86,7 +91,7 @@ export class MemoryRepository implements IBulkAsset { const { id } = await tx.insertInto('memory').values(memory).returning('id').executeTakeFirstOrThrow(); if (assetIds.size > 0) { - const values = [...assetIds].map((assetId) => ({ memoriesId: id, assetsId: assetId })); + const values = [...assetIds].map((assetId) => ({ memoriesId: id, assetId })); await tx.insertInto('memory_asset').values(values).execute(); } @@ -116,12 +121,12 @@ export class MemoryRepository implements IBulkAsset { const results = await this.db .selectFrom('memory_asset') - .select(['assetsId']) + .select(['assetId']) .where('memoriesId', '=', id) - .where('assetsId', 'in', assetIds) + .where('assetId', 'in', assetIds) .execute(); - return new Set(results.map(({ assetsId }) => assetsId)); + return new Set(results.map(({ assetId }) => assetId)); } @GenerateSql({ params: [DummyValue.UUID, [DummyValue.UUID]] }) @@ -132,7 +137,7 @@ export class MemoryRepository implements IBulkAsset { await this.db .insertInto('memory_asset') - .values(assetIds.map((assetId) => ({ memoriesId: id, assetsId: assetId }))) + .values(assetIds.map((assetId) => ({ memoriesId: id, assetId }))) .execute(); } @@ -143,7 +148,7 @@ export class MemoryRepository implements IBulkAsset { return; } - await this.db.deleteFrom('memory_asset').where('memoriesId', '=', id).where('assetsId', 'in', assetIds).execute(); + await this.db.deleteFrom('memory_asset').where('memoriesId', '=', id).where('assetId', 'in', assetIds).execute(); } private getByIdBuilder(id: string) { @@ -155,7 +160,7 @@ export class MemoryRepository implements IBulkAsset { eb .selectFrom('asset') .selectAll('asset') - .innerJoin('memory_asset', 'asset.id', 'memory_asset.assetsId') + .innerJoin('memory_asset', 'asset.id', 'memory_asset.assetId') .whereRef('memory_asset.memoriesId', '=', 'memory.id') .orderBy('asset.fileCreatedAt', 'asc') .where('asset.visibility', '=', sql.lit(AssetVisibility.Timeline)) diff --git a/server/src/repositories/shared-link-asset.repository.ts b/server/src/repositories/shared-link-asset.repository.ts index ab164683ca..1136546455 100644 --- a/server/src/repositories/shared-link-asset.repository.ts +++ b/server/src/repositories/shared-link-asset.repository.ts @@ -6,15 +6,15 @@ import { DB } from 'src/schema'; export class SharedLinkAssetRepository { constructor(@InjectKysely() private db: Kysely) {} - async remove(sharedLinkId: string, assetsId: string[]) { + async remove(sharedLinkId: string, assetId: string[]) { const deleted = await this.db .deleteFrom('shared_link_asset') - .where('shared_link_asset.sharedLinksId', '=', sharedLinkId) - .where('shared_link_asset.assetsId', 'in', assetsId) - .returning('assetsId') + .where('shared_link_asset.sharedLinkId', '=', sharedLinkId) + .where('shared_link_asset.assetId', 'in', assetId) + .returning('assetId') .execute(); - return deleted.map((row) => row.assetsId); + return deleted.map((row) => row.assetId); } @GenerateSql({ params: [{ sourceAssetId: DummyValue.UUID, targetAssetId: DummyValue.UUID }] }) @@ -24,8 +24,8 @@ export class SharedLinkAssetRepository { .expression((eb) => eb .selectFrom('shared_link_asset') - .select((eb) => [eb.val(targetAssetId).as('assetsId'), 'shared_link_asset.sharedLinksId']) - .where('shared_link_asset.assetsId', '=', sourceAssetId), + .select((eb) => [eb.val(targetAssetId).as('assetId'), 'shared_link_asset.sharedLinkId']) + .where('shared_link_asset.assetId', '=', sourceAssetId), ) .onConflict((oc) => oc.doNothing()) .execute(); diff --git a/server/src/repositories/shared-link.repository.ts b/server/src/repositories/shared-link.repository.ts index cdade25f76..7bfa9ac6ae 100644 --- a/server/src/repositories/shared-link.repository.ts +++ b/server/src/repositories/shared-link.repository.ts @@ -28,8 +28,8 @@ export class SharedLinkRepository { (eb) => eb .selectFrom('shared_link_asset') - .whereRef('shared_link.id', '=', 'shared_link_asset.sharedLinksId') - .innerJoin('asset', 'asset.id', 'shared_link_asset.assetsId') + .whereRef('shared_link.id', '=', 'shared_link_asset.sharedLinkId') + .innerJoin('asset', 'asset.id', 'shared_link_asset.assetId') .where('asset.deletedAt', 'is', null) .selectAll('asset') .innerJoinLateral( @@ -53,13 +53,13 @@ export class SharedLinkRepository { .selectAll('album') .whereRef('album.id', '=', 'shared_link.albumId') .where('album.deletedAt', 'is', null) - .leftJoin('album_asset', 'album_asset.albumsId', 'album.id') + .leftJoin('album_asset', 'album_asset.albumId', 'album.id') .leftJoinLateral( (eb) => eb .selectFrom('asset') .selectAll('asset') - .whereRef('album_asset.assetsId', '=', 'asset.id') + .whereRef('album_asset.assetId', '=', 'asset.id') .where('asset.deletedAt', 'is', null) .innerJoinLateral( (eb) => @@ -123,13 +123,13 @@ export class SharedLinkRepository { .selectFrom('shared_link') .selectAll('shared_link') .where('shared_link.userId', '=', userId) - .leftJoin('shared_link_asset', 'shared_link_asset.sharedLinksId', 'shared_link.id') + .leftJoin('shared_link_asset', 'shared_link_asset.sharedLinkId', 'shared_link.id') .leftJoinLateral( (eb) => eb .selectFrom('asset') .select((eb) => eb.fn.jsonAgg('asset').as('assets')) - .whereRef('asset.id', '=', 'shared_link_asset.assetsId') + .whereRef('asset.id', '=', 'shared_link_asset.assetId') .where('asset.deletedAt', 'is', null) .as('assets'), (join) => join.onTrue(), @@ -215,7 +215,7 @@ export class SharedLinkRepository { if (entity.assetIds && entity.assetIds.length > 0) { await this.db .insertInto('shared_link_asset') - .values(entity.assetIds!.map((assetsId) => ({ assetsId, sharedLinksId: id }))) + .values(entity.assetIds!.map((assetId) => ({ assetId, sharedLinkId: id }))) .execute(); } @@ -233,7 +233,7 @@ export class SharedLinkRepository { if (entity.assetIds && entity.assetIds.length > 0) { await this.db .insertInto('shared_link_asset') - .values(entity.assetIds!.map((assetsId) => ({ assetsId, sharedLinksId: id }))) + .values(entity.assetIds!.map((assetId) => ({ assetId, sharedLinkId: id }))) .execute(); } @@ -249,12 +249,12 @@ export class SharedLinkRepository { .selectFrom('shared_link') .selectAll('shared_link') .where('shared_link.id', '=', id) - .leftJoin('shared_link_asset', 'shared_link_asset.sharedLinksId', 'shared_link.id') + .leftJoin('shared_link_asset', 'shared_link_asset.sharedLinkId', 'shared_link.id') .leftJoinLateral( (eb) => eb .selectFrom('asset') - .whereRef('asset.id', '=', 'shared_link_asset.assetsId') + .whereRef('asset.id', '=', 'shared_link_asset.assetId') .selectAll('asset') .innerJoinLateral( (eb) => diff --git a/server/src/repositories/stack.repository.ts b/server/src/repositories/stack.repository.ts index 44db6fbeb4..d313d682bd 100644 --- a/server/src/repositories/stack.repository.ts +++ b/server/src/repositories/stack.repository.ts @@ -33,8 +33,8 @@ const withAssets = (eb: ExpressionBuilder, withTags = false) => { eb .selectFrom('tag') .select(columns.tag) - .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagsId') - .whereRef('tag_asset.assetsId', '=', 'asset.id'), + .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagId') + .whereRef('tag_asset.assetId', '=', 'asset.id'), ).as('tags'), ), ) diff --git a/server/src/repositories/sync.repository.ts b/server/src/repositories/sync.repository.ts index d8be720f45..437e32da16 100644 --- a/server/src/repositories/sync.repository.ts +++ b/server/src/repositories/sync.repository.ts @@ -143,8 +143,8 @@ class AlbumSync extends BaseSync { getCreatedAfter({ nowId, userId, afterCreateId }: SyncCreatedAfterOptions) { return this.db .selectFrom('album_user') - .select(['albumsId as id', 'createId']) - .where('usersId', '=', userId) + .select(['albumId as id', 'createId']) + .where('userId', '=', userId) .$if(!!afterCreateId, (qb) => qb.where('createId', '>=', afterCreateId!)) .where('createId', '<', nowId) .orderBy('createId', 'asc') @@ -168,8 +168,8 @@ class AlbumSync extends BaseSync { const userId = options.userId; return this.upsertQuery('album', options) .distinctOn(['album.id', 'album.updateId']) - .leftJoin('album_user as album_users', 'album.id', 'album_users.albumsId') - .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_users.usersId', '=', userId)])) + .leftJoin('album_user as album_users', 'album.id', 'album_users.albumId') + .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_users.userId', '=', userId)])) .select([ 'album.id', 'album.ownerId', @@ -190,10 +190,10 @@ class AlbumAssetSync extends BaseSync { @GenerateSql({ params: [dummyBackfillOptions, DummyValue.UUID], stream: true }) getBackfill(options: SyncBackfillOptions, albumId: string) { return this.backfillQuery('album_asset', options) - .innerJoin('asset', 'asset.id', 'album_asset.assetsId') + .innerJoin('asset', 'asset.id', 'album_asset.assetId') .select(columns.syncAsset) .select('album_asset.updateId') - .where('album_asset.albumsId', '=', albumId) + .where('album_asset.albumId', '=', albumId) .stream(); } @@ -201,13 +201,13 @@ class AlbumAssetSync extends BaseSync { getUpdates(options: SyncQueryOptions, albumToAssetAck: SyncAck) { const userId = options.userId; return this.upsertQuery('asset', options) - .innerJoin('album_asset', 'album_asset.assetsId', 'asset.id') + .innerJoin('album_asset', 'album_asset.assetId', 'asset.id') .select(columns.syncAsset) .select('asset.updateId') .where('album_asset.updateId', '<=', albumToAssetAck.updateId) // Ensure we only send updates for assets that the client already knows about - .innerJoin('album', 'album.id', 'album_asset.albumsId') - .leftJoin('album_user', 'album_user.albumsId', 'album_asset.albumsId') - .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.usersId', '=', userId)])) + .innerJoin('album', 'album.id', 'album_asset.albumId') + .leftJoin('album_user', 'album_user.albumId', 'album_asset.albumId') + .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.userId', '=', userId)])) .stream(); } @@ -216,11 +216,11 @@ class AlbumAssetSync extends BaseSync { const userId = options.userId; return this.upsertQuery('album_asset', options) .select('album_asset.updateId') - .innerJoin('asset', 'asset.id', 'album_asset.assetsId') + .innerJoin('asset', 'asset.id', 'album_asset.assetId') .select(columns.syncAsset) - .innerJoin('album', 'album.id', 'album_asset.albumsId') - .leftJoin('album_user', 'album_user.albumsId', 'album_asset.albumsId') - .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.usersId', '=', userId)])) + .innerJoin('album', 'album.id', 'album_asset.albumId') + .leftJoin('album_user', 'album_user.albumId', 'album_asset.albumId') + .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.userId', '=', userId)])) .stream(); } } @@ -229,10 +229,10 @@ class AlbumAssetExifSync extends BaseSync { @GenerateSql({ params: [dummyBackfillOptions, DummyValue.UUID], stream: true }) getBackfill(options: SyncBackfillOptions, albumId: string) { return this.backfillQuery('album_asset', options) - .innerJoin('asset_exif', 'asset_exif.assetId', 'album_asset.assetsId') + .innerJoin('asset_exif', 'asset_exif.assetId', 'album_asset.assetId') .select(columns.syncAssetExif) .select('album_asset.updateId') - .where('album_asset.albumsId', '=', albumId) + .where('album_asset.albumId', '=', albumId) .stream(); } @@ -240,13 +240,13 @@ class AlbumAssetExifSync extends BaseSync { getUpdates(options: SyncQueryOptions, albumToAssetAck: SyncAck) { const userId = options.userId; return this.upsertQuery('asset_exif', options) - .innerJoin('album_asset', 'album_asset.assetsId', 'asset_exif.assetId') + .innerJoin('album_asset', 'album_asset.assetId', 'asset_exif.assetId') .select(columns.syncAssetExif) .select('asset_exif.updateId') .where('album_asset.updateId', '<=', albumToAssetAck.updateId) // Ensure we only send exif updates for assets that the client already knows about - .innerJoin('album', 'album.id', 'album_asset.albumsId') - .leftJoin('album_user', 'album_user.albumsId', 'album_asset.albumsId') - .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.usersId', '=', userId)])) + .innerJoin('album', 'album.id', 'album_asset.albumId') + .leftJoin('album_user', 'album_user.albumId', 'album_asset.albumId') + .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.userId', '=', userId)])) .stream(); } @@ -255,11 +255,11 @@ class AlbumAssetExifSync extends BaseSync { const userId = options.userId; return this.upsertQuery('album_asset', options) .select('album_asset.updateId') - .innerJoin('asset_exif', 'asset_exif.assetId', 'album_asset.assetsId') + .innerJoin('asset_exif', 'asset_exif.assetId', 'album_asset.assetId') .select(columns.syncAssetExif) - .innerJoin('album', 'album.id', 'album_asset.albumsId') - .leftJoin('album_user', 'album_user.albumsId', 'album_asset.albumsId') - .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.usersId', '=', userId)])) + .innerJoin('album', 'album.id', 'album_asset.albumId') + .leftJoin('album_user', 'album_user.albumId', 'album_asset.albumId') + .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.userId', '=', userId)])) .stream(); } } @@ -268,8 +268,8 @@ class AlbumToAssetSync extends BaseSync { @GenerateSql({ params: [dummyBackfillOptions, DummyValue.UUID], stream: true }) getBackfill(options: SyncBackfillOptions, albumId: string) { return this.backfillQuery('album_asset', options) - .select(['album_asset.assetsId as assetId', 'album_asset.albumsId as albumId', 'album_asset.updateId']) - .where('album_asset.albumsId', '=', albumId) + .select(['album_asset.assetId as assetId', 'album_asset.albumId as albumId', 'album_asset.updateId']) + .where('album_asset.albumId', '=', albumId) .stream(); } @@ -290,8 +290,8 @@ class AlbumToAssetSync extends BaseSync { eb.parens( eb .selectFrom('album_user') - .select(['album_user.albumsId as id']) - .where('album_user.usersId', '=', userId), + .select(['album_user.albumId as id']) + .where('album_user.userId', '=', userId), ), ), ), @@ -307,10 +307,10 @@ class AlbumToAssetSync extends BaseSync { getUpserts(options: SyncQueryOptions) { const userId = options.userId; return this.upsertQuery('album_asset', options) - .select(['album_asset.assetsId as assetId', 'album_asset.albumsId as albumId', 'album_asset.updateId']) - .innerJoin('album', 'album.id', 'album_asset.albumsId') - .leftJoin('album_user', 'album_user.albumsId', 'album_asset.albumsId') - .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.usersId', '=', userId)])) + .select(['album_asset.assetId as assetId', 'album_asset.albumId as albumId', 'album_asset.updateId']) + .innerJoin('album', 'album.id', 'album_asset.albumId') + .leftJoin('album_user', 'album_user.albumId', 'album_asset.albumId') + .where((eb) => eb.or([eb('album.ownerId', '=', userId), eb('album_user.userId', '=', userId)])) .stream(); } } @@ -321,7 +321,7 @@ class AlbumUserSync extends BaseSync { return this.backfillQuery('album_user', options) .select(columns.syncAlbumUser) .select('album_user.updateId') - .where('albumsId', '=', albumId) + .where('albumId', '=', albumId) .stream(); } @@ -342,8 +342,8 @@ class AlbumUserSync extends BaseSync { eb.parens( eb .selectFrom('album_user') - .select(['album_user.albumsId as id']) - .where('album_user.usersId', '=', userId), + .select(['album_user.albumId as id']) + .where('album_user.userId', '=', userId), ), ), ), @@ -363,7 +363,7 @@ class AlbumUserSync extends BaseSync { .select('album_user.updateId') .where((eb) => eb( - 'album_user.albumsId', + 'album_user.albumId', 'in', eb .selectFrom('album') @@ -373,8 +373,8 @@ class AlbumUserSync extends BaseSync { eb.parens( eb .selectFrom('album_user as albumUsers') - .select(['albumUsers.albumsId as id']) - .where('albumUsers.usersId', '=', userId), + .select(['albumUsers.albumId as id']) + .where('albumUsers.userId', '=', userId), ), ), ), @@ -550,7 +550,7 @@ class MemoryToAssetSync extends BaseSync { @GenerateSql({ params: [dummyQueryOptions], stream: true }) getUpserts(options: SyncQueryOptions) { return this.upsertQuery('memory_asset', options) - .select(['memoriesId as memoryId', 'assetsId as assetId']) + .select(['memoriesId as memoryId', 'assetId as assetId']) .select('updateId') .where('memoriesId', 'in', (eb) => eb.selectFrom('memory').select('id').where('ownerId', '=', options.userId)) .stream(); diff --git a/server/src/repositories/tag.repository.ts b/server/src/repositories/tag.repository.ts index d9c44f4ba4..d4572886af 100644 --- a/server/src/repositories/tag.repository.ts +++ b/server/src/repositories/tag.repository.ts @@ -97,9 +97,9 @@ export class TagRepository { const results = await this.db .selectFrom('tag_asset') - .select(['assetsId as assetId']) - .where('tagsId', '=', tagId) - .where('assetsId', 'in', assetIds) + .select(['assetId as assetId']) + .where('tagId', '=', tagId) + .where('assetId', 'in', assetIds) .execute(); return new Set(results.map(({ assetId }) => assetId)); @@ -114,7 +114,7 @@ export class TagRepository { await this.db .insertInto('tag_asset') - .values(assetIds.map((assetId) => ({ tagsId: tagId, assetsId: assetId }))) + .values(assetIds.map((assetId) => ({ tagId, assetId }))) .execute(); } @@ -125,10 +125,10 @@ export class TagRepository { return; } - await this.db.deleteFrom('tag_asset').where('tagsId', '=', tagId).where('assetsId', 'in', assetIds).execute(); + await this.db.deleteFrom('tag_asset').where('tagId', '=', tagId).where('assetId', 'in', assetIds).execute(); } - @GenerateSql({ params: [[{ assetId: DummyValue.UUID, tagsIds: [DummyValue.UUID] }]] }) + @GenerateSql({ params: [[{ assetId: DummyValue.UUID, tagIds: DummyValue.UUID }]] }) @Chunked() upsertAssetIds(items: Insertable[]) { if (items.length === 0) { @@ -147,7 +147,7 @@ export class TagRepository { @Chunked({ paramIndex: 1 }) replaceAssetTags(assetId: string, tagIds: string[]) { return this.db.transaction().execute(async (tx) => { - await tx.deleteFrom('tag_asset').where('assetsId', '=', assetId).execute(); + await tx.deleteFrom('tag_asset').where('assetId', '=', assetId).execute(); if (tagIds.length === 0) { return; @@ -155,7 +155,7 @@ export class TagRepository { return tx .insertInto('tag_asset') - .values(tagIds.map((tagId) => ({ tagsId: tagId, assetsId: assetId }))) + .values(tagIds.map((tagId) => ({ tagId, assetId }))) .onConflict((oc) => oc.doNothing()) .returningAll() .execute(); @@ -170,7 +170,7 @@ export class TagRepository { exists( selectFrom('tag_closure') .whereRef('tag.id', '=', 'tag_closure.id_ancestor') - .innerJoin('tag_asset', 'tag_closure.id_descendant', 'tag_asset.tagsId'), + .innerJoin('tag_asset', 'tag_closure.id_descendant', 'tag_asset.tagId'), ), ), ) diff --git a/server/src/schema/functions.ts b/server/src/schema/functions.ts index e255742b5d..385db37cf8 100644 --- a/server/src/schema/functions.ts +++ b/server/src/schema/functions.ts @@ -29,7 +29,7 @@ export const album_user_after_insert = registerFunction({ body: ` BEGIN UPDATE album SET "updatedAt" = clock_timestamp(), "updateId" = immich_uuid_v7(clock_timestamp()) - WHERE "id" IN (SELECT DISTINCT "albumsId" FROM inserted_rows); + WHERE "id" IN (SELECT DISTINCT "albumId" FROM inserted_rows); RETURN NULL; END`, }); @@ -139,8 +139,8 @@ export const album_asset_delete_audit = registerFunction({ body: ` BEGIN INSERT INTO album_asset_audit ("albumId", "assetId") - SELECT "albumsId", "assetsId" FROM OLD - WHERE "albumsId" IN (SELECT "id" FROM album WHERE "id" IN (SELECT "albumsId" FROM OLD)); + SELECT "albumId", "assetId" FROM OLD + WHERE "albumId" IN (SELECT "id" FROM album WHERE "id" IN (SELECT "albumId" FROM OLD)); RETURN NULL; END`, }); @@ -152,12 +152,12 @@ export const album_user_delete_audit = registerFunction({ body: ` BEGIN INSERT INTO album_audit ("albumId", "userId") - SELECT "albumsId", "usersId" + SELECT "albumId", "userId" FROM OLD; IF pg_trigger_depth() = 1 THEN INSERT INTO album_user_audit ("albumId", "userId") - SELECT "albumsId", "usersId" + SELECT "albumId", "userId" FROM OLD; END IF; @@ -185,7 +185,7 @@ export const memory_asset_delete_audit = registerFunction({ body: ` BEGIN INSERT INTO memory_asset_audit ("memoryId", "assetId") - SELECT "memoriesId", "assetsId" FROM OLD + SELECT "memoriesId", "assetId" FROM OLD WHERE "memoriesId" IN (SELECT "id" FROM memory WHERE "id" IN (SELECT "memoriesId" FROM OLD)); RETURN NULL; END`, diff --git a/server/src/schema/migrations/1761755618862-FixColumnNames.ts b/server/src/schema/migrations/1761755618862-FixColumnNames.ts new file mode 100644 index 0000000000..25131a1640 --- /dev/null +++ b/server/src/schema/migrations/1761755618862-FixColumnNames.ts @@ -0,0 +1,99 @@ +import { Kysely, sql } from 'kysely'; + +export async function up(db: Kysely): Promise { + // rename columns + await sql`ALTER TABLE "album_asset" RENAME COLUMN "albumsId" TO "albumId";`.execute(db); + await sql`ALTER TABLE "album_asset" RENAME COLUMN "assetsId" TO "assetId";`.execute(db); + await sql`ALTER TABLE "album_user" RENAME COLUMN "albumsId" TO "albumId";`.execute(db); + await sql`ALTER TABLE "album_user" RENAME COLUMN "usersId" TO "userId";`.execute(db); + await sql`ALTER TABLE "memory_asset" RENAME COLUMN "assetsId" TO "assetId";`.execute(db); + await sql`ALTER TABLE "shared_link_asset" RENAME COLUMN "assetsId" TO "assetId";`.execute(db); + await sql`ALTER TABLE "shared_link_asset" RENAME COLUMN "sharedLinksId" TO "sharedLinkId";`.execute(db); + await sql`ALTER TABLE "tag_asset" RENAME COLUMN "assetsId" TO "assetId";`.execute(db); + await sql`ALTER TABLE "tag_asset" RENAME COLUMN "tagsId" TO "tagId";`.execute(db); + + // rename constraints + await sql`ALTER TABLE "album_asset" RENAME CONSTRAINT "album_asset_albumsId_fkey" TO "album_asset_albumId_fkey";`.execute(db); + await sql`ALTER TABLE "album_asset" RENAME CONSTRAINT "album_asset_assetsId_fkey" TO "album_asset_assetId_fkey";`.execute(db); + await sql`ALTER TABLE "album_user" RENAME CONSTRAINT "album_user_albumsId_fkey" TO "album_user_albumId_fkey";`.execute(db); + await sql`ALTER TABLE "album_user" RENAME CONSTRAINT "album_user_usersId_fkey" TO "album_user_userId_fkey";`.execute(db); + await sql`ALTER TABLE "memory_asset" RENAME CONSTRAINT "memory_asset_assetsId_fkey" TO "memory_asset_assetId_fkey";`.execute(db); + await sql`ALTER TABLE "shared_link_asset" RENAME CONSTRAINT "shared_link_asset_assetsId_fkey" TO "shared_link_asset_assetId_fkey";`.execute(db); + await sql`ALTER TABLE "shared_link_asset" RENAME CONSTRAINT "shared_link_asset_sharedLinksId_fkey" TO "shared_link_asset_sharedLinkId_fkey";`.execute(db); + await sql`ALTER TABLE "tag_asset" RENAME CONSTRAINT "tag_asset_assetsId_fkey" TO "tag_asset_assetId_fkey";`.execute(db); + await sql`ALTER TABLE "tag_asset" RENAME CONSTRAINT "tag_asset_tagsId_fkey" TO "tag_asset_tagId_fkey";`.execute(db); + + // rename indexes + await sql`ALTER INDEX "album_asset_albumsId_idx" RENAME TO "album_asset_albumId_idx";`.execute(db); + await sql`ALTER INDEX "album_asset_assetsId_idx" RENAME TO "album_asset_assetId_idx";`.execute(db); + await sql`ALTER INDEX "album_user_usersId_idx" RENAME TO "album_user_userId_idx";`.execute(db); + await sql`ALTER INDEX "album_user_albumsId_idx" RENAME TO "album_user_albumId_idx";`.execute(db); + await sql`ALTER INDEX "memory_asset_assetsId_idx" RENAME TO "memory_asset_assetId_idx";`.execute(db); + await sql`ALTER INDEX "shared_link_asset_sharedLinksId_idx" RENAME TO "shared_link_asset_sharedLinkId_idx";`.execute(db); + await sql`ALTER INDEX "shared_link_asset_assetsId_idx" RENAME TO "shared_link_asset_assetId_idx";`.execute(db); + await sql`ALTER INDEX "tag_asset_assetsId_idx" RENAME TO "tag_asset_assetId_idx";`.execute(db); + await sql`ALTER INDEX "tag_asset_tagsId_idx" RENAME TO "tag_asset_tagId_idx";`.execute(db); + await sql`ALTER INDEX "tag_asset_assetsId_tagsId_idx" RENAME TO "tag_asset_assetId_tagId_idx";`.execute(db); + + // update triggers and functions + await sql`CREATE OR REPLACE FUNCTION album_user_after_insert() + RETURNS TRIGGER + LANGUAGE PLPGSQL + AS $$ + BEGIN + UPDATE album SET "updatedAt" = clock_timestamp(), "updateId" = immich_uuid_v7(clock_timestamp()) + WHERE "id" IN (SELECT DISTINCT "albumId" FROM inserted_rows); + RETURN NULL; + END + $$;`.execute(db); + await sql`CREATE OR REPLACE FUNCTION album_asset_delete_audit() + RETURNS TRIGGER + LANGUAGE PLPGSQL + AS $$ + BEGIN + INSERT INTO album_asset_audit ("albumId", "assetId") + SELECT "albumId", "assetId" FROM OLD + WHERE "albumId" IN (SELECT "id" FROM album WHERE "id" IN (SELECT "albumId" FROM OLD)); + RETURN NULL; + END + $$;`.execute(db); + await sql`CREATE OR REPLACE FUNCTION album_user_delete_audit() + RETURNS TRIGGER + LANGUAGE PLPGSQL + AS $$ + BEGIN + INSERT INTO album_audit ("albumId", "userId") + SELECT "albumId", "userId" + FROM OLD; + + IF pg_trigger_depth() = 1 THEN + INSERT INTO album_user_audit ("albumId", "userId") + SELECT "albumId", "userId" + FROM OLD; + END IF; + + RETURN NULL; + END + $$;`.execute(db); + await sql`CREATE OR REPLACE FUNCTION memory_asset_delete_audit() + RETURNS TRIGGER + LANGUAGE PLPGSQL + AS $$ + BEGIN + INSERT INTO memory_asset_audit ("memoryId", "assetId") + SELECT "memoriesId", "assetId" FROM OLD + WHERE "memoriesId" IN (SELECT "id" FROM memory WHERE "id" IN (SELECT "memoriesId" FROM OLD)); + RETURN NULL; + END + $$;`.execute(db); + + // update overrides + await sql`UPDATE "migration_overrides" SET "value" = '{"type":"function","name":"album_user_after_insert","sql":"CREATE OR REPLACE FUNCTION album_user_after_insert()\\n RETURNS TRIGGER\\n LANGUAGE PLPGSQL\\n AS $$\\n BEGIN\\n UPDATE album SET \\"updatedAt\\" = clock_timestamp(), \\"updateId\\" = immich_uuid_v7(clock_timestamp())\\n WHERE \\"id\\" IN (SELECT DISTINCT \\"albumId\\" FROM inserted_rows);\\n RETURN NULL;\\n END\\n $$;"}'::jsonb WHERE "name" = 'function_album_user_after_insert';`.execute(db); + await sql`UPDATE "migration_overrides" SET "value" = '{"type":"function","name":"album_asset_delete_audit","sql":"CREATE OR REPLACE FUNCTION album_asset_delete_audit()\\n RETURNS TRIGGER\\n LANGUAGE PLPGSQL\\n AS $$\\n BEGIN\\n INSERT INTO album_asset_audit (\\"albumId\\", \\"assetId\\")\\n SELECT \\"albumId\\", \\"assetId\\" FROM OLD\\n WHERE \\"albumId\\" IN (SELECT \\"id\\" FROM album WHERE \\"id\\" IN (SELECT \\"albumId\\" FROM OLD));\\n RETURN NULL;\\n END\\n $$;"}'::jsonb WHERE "name" = 'function_album_asset_delete_audit';`.execute(db); + await sql`UPDATE "migration_overrides" SET "value" = '{"type":"function","name":"album_user_delete_audit","sql":"CREATE OR REPLACE FUNCTION album_user_delete_audit()\\n RETURNS TRIGGER\\n LANGUAGE PLPGSQL\\n AS $$\\n BEGIN\\n INSERT INTO album_audit (\\"albumId\\", \\"userId\\")\\n SELECT \\"albumId\\", \\"userId\\"\\n FROM OLD;\\n\\n IF pg_trigger_depth() = 1 THEN\\n INSERT INTO album_user_audit (\\"albumId\\", \\"userId\\")\\n SELECT \\"albumId\\", \\"userId\\"\\n FROM OLD;\\n END IF;\\n\\n RETURN NULL;\\n END\\n $$;"}'::jsonb WHERE "name" = 'function_album_user_delete_audit';`.execute(db); + await sql`UPDATE "migration_overrides" SET "value" = '{"type":"function","name":"memory_asset_delete_audit","sql":"CREATE OR REPLACE FUNCTION memory_asset_delete_audit()\\n RETURNS TRIGGER\\n LANGUAGE PLPGSQL\\n AS $$\\n BEGIN\\n INSERT INTO memory_asset_audit (\\"memoryId\\", \\"assetId\\")\\n SELECT \\"memoriesId\\", \\"assetId\\" FROM OLD\\n WHERE \\"memoriesId\\" IN (SELECT \\"id\\" FROM memory WHERE \\"id\\" IN (SELECT \\"memoriesId\\" FROM OLD));\\n RETURN NULL;\\n END\\n $$;"}'::jsonb WHERE "name" = 'function_memory_asset_delete_audit';`.execute(db); +} + +export function down() { + // not implemented +} diff --git a/server/src/schema/tables/activity.table.ts b/server/src/schema/tables/activity.table.ts index 128cf2eabd..dfa7c98e42 100644 --- a/server/src/schema/tables/activity.table.ts +++ b/server/src/schema/tables/activity.table.ts @@ -32,7 +32,7 @@ import { @ForeignKeyConstraint({ columns: ['albumId', 'assetId'], referenceTable: () => AlbumAssetTable, - referenceColumns: ['albumsId', 'assetsId'], + referenceColumns: ['albumId', 'assetId'], onUpdate: 'NO ACTION', onDelete: 'CASCADE', }) diff --git a/server/src/schema/tables/album-asset.table.ts b/server/src/schema/tables/album-asset.table.ts index c34546c3f3..dea271239b 100644 --- a/server/src/schema/tables/album-asset.table.ts +++ b/server/src/schema/tables/album-asset.table.ts @@ -22,10 +22,10 @@ import { }) export class AlbumAssetTable { @ForeignKeyColumn(() => AlbumTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE', nullable: false, primary: true }) - albumsId!: string; + albumId!: string; @ForeignKeyColumn(() => AssetTable, { onDelete: 'CASCADE', onUpdate: 'CASCADE', nullable: false, primary: true }) - assetsId!: string; + assetId!: string; @CreateDateColumn() createdAt!: Generated; diff --git a/server/src/schema/tables/album-user.table.ts b/server/src/schema/tables/album-user.table.ts index 94383218da..761aabc1af 100644 --- a/server/src/schema/tables/album-user.table.ts +++ b/server/src/schema/tables/album-user.table.ts @@ -37,7 +37,7 @@ export class AlbumUserTable { nullable: false, primary: true, }) - albumsId!: string; + albumId!: string; @ForeignKeyColumn(() => UserTable, { onDelete: 'CASCADE', @@ -45,7 +45,7 @@ export class AlbumUserTable { nullable: false, primary: true, }) - usersId!: string; + userId!: string; @Column({ type: 'character varying', default: AlbumUserRole.Editor }) role!: Generated; diff --git a/server/src/schema/tables/memory-asset.table.ts b/server/src/schema/tables/memory-asset.table.ts index f535155233..b162000ca0 100644 --- a/server/src/schema/tables/memory-asset.table.ts +++ b/server/src/schema/tables/memory-asset.table.ts @@ -25,7 +25,7 @@ export class MemoryAssetTable { memoriesId!: string; @ForeignKeyColumn(() => AssetTable, { onUpdate: 'CASCADE', onDelete: 'CASCADE', primary: true }) - assetsId!: string; + assetId!: string; @CreateDateColumn() createdAt!: Generated; diff --git a/server/src/schema/tables/shared-link-asset.table.ts b/server/src/schema/tables/shared-link-asset.table.ts index 37b652c4ab..37e6a3d9f0 100644 --- a/server/src/schema/tables/shared-link-asset.table.ts +++ b/server/src/schema/tables/shared-link-asset.table.ts @@ -5,8 +5,8 @@ import { ForeignKeyColumn, Table } from 'src/sql-tools'; @Table('shared_link_asset') export class SharedLinkAssetTable { @ForeignKeyColumn(() => AssetTable, { onUpdate: 'CASCADE', onDelete: 'CASCADE', primary: true }) - assetsId!: string; + assetId!: string; @ForeignKeyColumn(() => SharedLinkTable, { onUpdate: 'CASCADE', onDelete: 'CASCADE', primary: true }) - sharedLinksId!: string; + sharedLinkId!: string; } diff --git a/server/src/schema/tables/tag-asset.table.ts b/server/src/schema/tables/tag-asset.table.ts index bc02129217..3ea2361b4f 100644 --- a/server/src/schema/tables/tag-asset.table.ts +++ b/server/src/schema/tables/tag-asset.table.ts @@ -2,12 +2,12 @@ import { AssetTable } from 'src/schema/tables/asset.table'; import { TagTable } from 'src/schema/tables/tag.table'; import { ForeignKeyColumn, Index, Table } from 'src/sql-tools'; -@Index({ columns: ['assetsId', 'tagsId'] }) +@Index({ columns: ['assetId', 'tagId'] }) @Table('tag_asset') export class TagAssetTable { @ForeignKeyColumn(() => AssetTable, { onUpdate: 'CASCADE', onDelete: 'CASCADE', primary: true, index: true }) - assetsId!: string; + assetId!: string; @ForeignKeyColumn(() => TagTable, { onUpdate: 'CASCADE', onDelete: 'CASCADE', primary: true, index: true }) - tagsId!: string; + tagId!: string; } diff --git a/server/src/services/album.service.spec.ts b/server/src/services/album.service.spec.ts index e22d486bba..fa8a9c6450 100644 --- a/server/src/services/album.service.spec.ts +++ b/server/src/services/album.service.spec.ts @@ -402,16 +402,16 @@ describe(AlbumService.name, () => { mocks.album.update.mockResolvedValue(albumStub.sharedWithAdmin); mocks.user.get.mockResolvedValue(userStub.user2); mocks.albumUser.create.mockResolvedValue({ - usersId: userStub.user2.id, - albumsId: albumStub.sharedWithAdmin.id, + userId: userStub.user2.id, + albumId: albumStub.sharedWithAdmin.id, role: AlbumUserRole.Editor, }); await sut.addUsers(authStub.user1, albumStub.sharedWithAdmin.id, { albumUsers: [{ userId: authStub.user2.user.id }], }); expect(mocks.albumUser.create).toHaveBeenCalledWith({ - usersId: authStub.user2.user.id, - albumsId: albumStub.sharedWithAdmin.id, + userId: authStub.user2.user.id, + albumId: albumStub.sharedWithAdmin.id, }); expect(mocks.event.emit).toHaveBeenCalledWith('AlbumInvite', { id: albumStub.sharedWithAdmin.id, @@ -439,8 +439,8 @@ describe(AlbumService.name, () => { expect(mocks.albumUser.delete).toHaveBeenCalledTimes(1); expect(mocks.albumUser.delete).toHaveBeenCalledWith({ - albumsId: albumStub.sharedWithUser.id, - usersId: userStub.user1.id, + albumId: albumStub.sharedWithUser.id, + userId: userStub.user1.id, }); expect(mocks.album.getById).toHaveBeenCalledWith(albumStub.sharedWithUser.id, { withAssets: false }); }); @@ -467,8 +467,8 @@ describe(AlbumService.name, () => { expect(mocks.albumUser.delete).toHaveBeenCalledTimes(1); expect(mocks.albumUser.delete).toHaveBeenCalledWith({ - albumsId: albumStub.sharedWithUser.id, - usersId: authStub.user1.user.id, + albumId: albumStub.sharedWithUser.id, + userId: authStub.user1.user.id, }); }); @@ -480,8 +480,8 @@ describe(AlbumService.name, () => { expect(mocks.albumUser.delete).toHaveBeenCalledTimes(1); expect(mocks.albumUser.delete).toHaveBeenCalledWith({ - albumsId: albumStub.sharedWithUser.id, - usersId: authStub.user1.user.id, + albumId: albumStub.sharedWithUser.id, + userId: authStub.user1.user.id, }); }); @@ -515,7 +515,7 @@ describe(AlbumService.name, () => { role: AlbumUserRole.Editor, }); expect(mocks.albumUser.update).toHaveBeenCalledWith( - { albumsId: albumStub.sharedWithAdmin.id, usersId: userStub.admin.id }, + { albumId: albumStub.sharedWithAdmin.id, userId: userStub.admin.id }, { role: AlbumUserRole.Editor }, ); }); @@ -804,12 +804,12 @@ describe(AlbumService.name, () => { albumThumbnailAssetId: 'asset-1', }); expect(mocks.album.addAssetIdsToAlbums).toHaveBeenCalledWith([ - { albumsId: 'album-123', assetsId: 'asset-1' }, - { albumsId: 'album-123', assetsId: 'asset-2' }, - { albumsId: 'album-123', assetsId: 'asset-3' }, - { albumsId: 'album-321', assetsId: 'asset-1' }, - { albumsId: 'album-321', assetsId: 'asset-2' }, - { albumsId: 'album-321', assetsId: 'asset-3' }, + { albumId: 'album-123', assetId: 'asset-1' }, + { albumId: 'album-123', assetId: 'asset-2' }, + { albumId: 'album-123', assetId: 'asset-3' }, + { albumId: 'album-321', assetId: 'asset-1' }, + { albumId: 'album-321', assetId: 'asset-2' }, + { albumId: 'album-321', assetId: 'asset-3' }, ]); }); @@ -840,12 +840,12 @@ describe(AlbumService.name, () => { albumThumbnailAssetId: 'asset-id', }); expect(mocks.album.addAssetIdsToAlbums).toHaveBeenCalledWith([ - { albumsId: 'album-123', assetsId: 'asset-1' }, - { albumsId: 'album-123', assetsId: 'asset-2' }, - { albumsId: 'album-123', assetsId: 'asset-3' }, - { albumsId: 'album-321', assetsId: 'asset-1' }, - { albumsId: 'album-321', assetsId: 'asset-2' }, - { albumsId: 'album-321', assetsId: 'asset-3' }, + { albumId: 'album-123', assetId: 'asset-1' }, + { albumId: 'album-123', assetId: 'asset-2' }, + { albumId: 'album-123', assetId: 'asset-3' }, + { albumId: 'album-321', assetId: 'asset-1' }, + { albumId: 'album-321', assetId: 'asset-2' }, + { albumId: 'album-321', assetId: 'asset-3' }, ]); }); @@ -876,12 +876,12 @@ describe(AlbumService.name, () => { albumThumbnailAssetId: 'asset-1', }); expect(mocks.album.addAssetIdsToAlbums).toHaveBeenCalledWith([ - { albumsId: 'album-123', assetsId: 'asset-1' }, - { albumsId: 'album-123', assetsId: 'asset-2' }, - { albumsId: 'album-123', assetsId: 'asset-3' }, - { albumsId: 'album-321', assetsId: 'asset-1' }, - { albumsId: 'album-321', assetsId: 'asset-2' }, - { albumsId: 'album-321', assetsId: 'asset-3' }, + { albumId: 'album-123', assetId: 'asset-1' }, + { albumId: 'album-123', assetId: 'asset-2' }, + { albumId: 'album-123', assetId: 'asset-3' }, + { albumId: 'album-321', assetId: 'asset-1' }, + { albumId: 'album-321', assetId: 'asset-2' }, + { albumId: 'album-321', assetId: 'asset-3' }, ]); expect(mocks.event.emit).toHaveBeenCalledWith('AlbumUpdate', { id: 'album-123', @@ -936,9 +936,9 @@ describe(AlbumService.name, () => { albumThumbnailAssetId: 'asset-1', }); expect(mocks.album.addAssetIdsToAlbums).toHaveBeenCalledWith([ - { albumsId: 'album-123', assetsId: 'asset-1' }, - { albumsId: 'album-123', assetsId: 'asset-2' }, - { albumsId: 'album-123', assetsId: 'asset-3' }, + { albumId: 'album-123', assetId: 'asset-1' }, + { albumId: 'album-123', assetId: 'asset-2' }, + { albumId: 'album-123', assetId: 'asset-3' }, ]); expect(mocks.event.emit).toHaveBeenCalledWith('AlbumUpdate', { id: 'album-123', @@ -977,12 +977,12 @@ describe(AlbumService.name, () => { albumThumbnailAssetId: 'asset-1', }); expect(mocks.album.addAssetIdsToAlbums).toHaveBeenCalledWith([ - { albumsId: 'album-123', assetsId: 'asset-1' }, - { albumsId: 'album-123', assetsId: 'asset-2' }, - { albumsId: 'album-123', assetsId: 'asset-3' }, - { albumsId: 'album-321', assetsId: 'asset-1' }, - { albumsId: 'album-321', assetsId: 'asset-2' }, - { albumsId: 'album-321', assetsId: 'asset-3' }, + { albumId: 'album-123', assetId: 'asset-1' }, + { albumId: 'album-123', assetId: 'asset-2' }, + { albumId: 'album-123', assetId: 'asset-3' }, + { albumId: 'album-321', assetId: 'asset-1' }, + { albumId: 'album-321', assetId: 'asset-2' }, + { albumId: 'album-321', assetId: 'asset-3' }, ]); expect(mocks.access.asset.checkPartnerAccess).toHaveBeenCalledWith( authStub.admin.user.id, @@ -1014,9 +1014,9 @@ describe(AlbumService.name, () => { albumThumbnailAssetId: 'asset-1', }); expect(mocks.album.addAssetIdsToAlbums).toHaveBeenCalledWith([ - { albumsId: 'album-321', assetsId: 'asset-1' }, - { albumsId: 'album-321', assetsId: 'asset-2' }, - { albumsId: 'album-321', assetsId: 'asset-3' }, + { albumId: 'album-321', assetId: 'asset-1' }, + { albumId: 'album-321', assetId: 'asset-2' }, + { albumId: 'album-321', assetId: 'asset-3' }, ]); }); diff --git a/server/src/services/album.service.ts b/server/src/services/album.service.ts index dd12e31892..18747dbc3a 100644 --- a/server/src/services/album.service.ts +++ b/server/src/services/album.service.ts @@ -215,7 +215,7 @@ export class AlbumService extends BaseService { return results; } - const albumAssetValues: { albumsId: string; assetsId: string }[] = []; + const albumAssetValues: { albumId: string; assetId: string }[] = []; const events: { id: string; recipients: string[] }[] = []; for (const albumId of allowedAlbumIds) { const existingAssetIds = await this.albumRepository.getAssetIds(albumId, [...allowedAssetIds]); @@ -228,7 +228,7 @@ export class AlbumService extends BaseService { results.success = true; for (const assetId of notPresentAssetIds) { - albumAssetValues.push({ albumsId: albumId, assetsId: assetId }); + albumAssetValues.push({ albumId, assetId }); } await this.albumRepository.update(albumId, { id: albumId, @@ -289,7 +289,7 @@ export class AlbumService extends BaseService { throw new BadRequestException('User not found'); } - await this.albumUserRepository.create({ usersId: userId, albumsId: id, role }); + await this.albumUserRepository.create({ userId, albumId: id, role }); await this.eventRepository.emit('AlbumInvite', { id, userId }); } @@ -317,12 +317,12 @@ export class AlbumService extends BaseService { await this.requireAccess({ auth, permission: Permission.AlbumShare, ids: [id] }); } - await this.albumUserRepository.delete({ albumsId: id, usersId: userId }); + await this.albumUserRepository.delete({ albumId: id, userId }); } async updateUser(auth: AuthDto, id: string, userId: string, dto: UpdateAlbumUserDto): Promise { await this.requireAccess({ auth, permission: Permission.AlbumShare, ids: [id] }); - await this.albumUserRepository.update({ albumsId: id, usersId: userId }, { role: dto.role }); + await this.albumUserRepository.update({ albumId: id, userId }, { role: dto.role }); } private async findOrFail(id: string, options: AlbumInfoOptions) { diff --git a/server/src/services/api.service.ts b/server/src/services/api.service.ts index 44c0c76fc2..1ac4df3c24 100644 --- a/server/src/services/api.service.ts +++ b/server/src/services/api.service.ts @@ -65,9 +65,10 @@ export class ApiService { } return async (request: Request, res: Response, next: NextFunction) => { + const method = request.method.toLowerCase(); if ( request.url.startsWith('/api') || - request.method.toLowerCase() !== 'get' || + (method !== 'get' && method !== 'head') || excludePaths.some((item) => request.url.startsWith(item)) ) { return next(); diff --git a/server/src/services/metadata.service.spec.ts b/server/src/services/metadata.service.spec.ts index 0adb390f6a..220216a2c8 100644 --- a/server/src/services/metadata.service.spec.ts +++ b/server/src/services/metadata.service.spec.ts @@ -1,4 +1,5 @@ import { BinaryField, ExifDateTime } from 'exiftool-vendored'; +import { DateTime } from 'luxon'; import { randomBytes } from 'node:crypto'; import { Stats } from 'node:fs'; import { defaults } from 'src/config'; @@ -231,7 +232,7 @@ describe(MetadataService.name, () => { }); }); - it('should account for the server being in a non-UTC timezone', async () => { + it('should determine dateTimeOriginal regardless of the server time zone', async () => { process.env.TZ = 'America/Los_Angeles'; mocks.assetJob.getForMetadataExtraction.mockResolvedValue(assetStub.sidecar); mockReadTags({ DateTimeOriginal: '2022:01:01 00:00:00' }); @@ -239,7 +240,7 @@ describe(MetadataService.name, () => { await sut.handleMetadataExtraction({ id: assetStub.image.id }); expect(mocks.asset.upsertExif).toHaveBeenCalledWith( expect.objectContaining({ - dateTimeOriginal: new Date('2022-01-01T08:00:00.000Z'), + dateTimeOriginal: new Date('2022-01-01T00:00:00.000Z'), }), ); @@ -856,6 +857,7 @@ describe(MetadataService.name, () => { tz: 'UTC-11:30', Rating: 3, }; + mocks.assetJob.getForMetadataExtraction.mockResolvedValue(assetStub.image); mockReadTags(tags); @@ -897,7 +899,7 @@ describe(MetadataService.name, () => { id: assetStub.image.id, duration: null, fileCreatedAt: dateForTest, - localDateTime: dateForTest, + localDateTime: DateTime.fromISO('1970-01-01T00:00:00.000Z').toJSDate(), }), ); }); @@ -1595,7 +1597,7 @@ describe(MetadataService.name, () => { const result = firstDateTime(tags); expect(result?.tag).toBe('SonyDateTime2'); - expect(result?.dateTime?.toDate()?.toISOString()).toBe('2023-07-07T07:00:00.000Z'); + expect(result?.dateTime?.toISOString()).toBe('2023-07-07T07:00:00'); }); it('should respect full priority order with all date tags present', () => { @@ -1624,7 +1626,7 @@ describe(MetadataService.name, () => { const result = firstDateTime(tags); // Should use SubSecDateTimeOriginal as it has highest priority expect(result?.tag).toBe('SubSecDateTimeOriginal'); - expect(result?.dateTime?.toDate()?.toISOString()).toBe('2023-01-01T01:00:00.000Z'); + expect(result?.dateTime?.toISOString()).toBe('2023-01-01T01:00:00'); }); it('should handle missing SubSec tags and use available date tags', () => { @@ -1644,7 +1646,7 @@ describe(MetadataService.name, () => { const result = firstDateTime(tags); // Should use CreationDate when available expect(result?.tag).toBe('CreationDate'); - expect(result?.dateTime?.toDate()?.toISOString()).toBe('2023-07-07T07:00:00.000Z'); + expect(result?.dateTime?.toISOString()).toBe('2023-07-07T07:00:00'); }); it('should handle invalid date formats gracefully', () => { @@ -1658,7 +1660,7 @@ describe(MetadataService.name, () => { const result = firstDateTime(tags); // Should skip invalid dates and use the first valid one expect(result?.tag).toBe('GPSDateTime'); - expect(result?.dateTime?.toDate()?.toISOString()).toBe('2023-10-10T10:00:00.000Z'); + expect(result?.dateTime?.toISOString()).toBe('2023-10-10T10:00:00'); }); it('should prefer CreationDate over CreateDate', () => { diff --git a/server/src/services/metadata.service.ts b/server/src/services/metadata.service.ts index b73a9b6bf0..746f62a944 100644 --- a/server/src/services/metadata.service.ts +++ b/server/src/services/metadata.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { ContainerDirectoryItem, ExifDateTime, Tags } from 'exiftool-vendored'; import { Insertable } from 'kysely'; import _ from 'lodash'; -import { Duration } from 'luxon'; +import { DateTime, Duration } from 'luxon'; import { Stats } from 'node:fs'; import { constants } from 'node:fs/promises'; import { join, parse } from 'node:path'; @@ -236,8 +236,8 @@ export class MetadataService extends BaseService { latitude: number | null = null, longitude: number | null = null; if (this.hasGeo(exifTags)) { - latitude = exifTags.GPSLatitude; - longitude = exifTags.GPSLongitude; + latitude = Number(exifTags.GPSLatitude); + longitude = Number(exifTags.GPSLongitude); if (reverseGeocoding.enabled) { geo = await this.mapRepository.reverseGeocode({ latitude, longitude }); } @@ -866,40 +866,47 @@ export class MetadataService extends BaseService { this.logger.debug(`No timezone information found for asset ${asset.id}: ${asset.originalPath}`); } - let dateTimeOriginal = dateTime?.toDate(); - let localDateTime = dateTime?.toDateTime().setZone('UTC', { keepLocalTime: true }).toJSDate(); + let dateTimeOriginal = dateTime?.toDateTime(); + + // do not let JavaScript use local timezone + if (dateTimeOriginal && !dateTime?.hasZone) { + dateTimeOriginal = dateTimeOriginal.setZone('UTC', { keepLocalTime: true }); + } + + // align with whatever timeZone we chose + dateTimeOriginal = dateTimeOriginal?.setZone(timeZone ?? 'UTC'); + + // store as "local time" + let localDateTime = dateTimeOriginal?.setZone('UTC', { keepLocalTime: true }); + if (!localDateTime || !dateTimeOriginal) { // FileCreateDate is not available on linux, likely because exiftool hasn't integrated the statx syscall yet // birthtime is not available in Docker on macOS, so it appears as 0 - const earliestDate = new Date( + const earliestDate = DateTime.fromMillis( Math.min( asset.fileCreatedAt.getTime(), stats.birthtimeMs ? Math.min(stats.mtimeMs, stats.birthtimeMs) : stats.mtime.getTime(), ), ); this.logger.debug( - `No exif date time found, falling back on ${earliestDate.toISOString()}, earliest of file creation and modification for asset ${asset.id}: ${asset.originalPath}`, + `No exif date time found, falling back on ${earliestDate.toISO()}, earliest of file creation and modification for asset ${asset.id}: ${asset.originalPath}`, ); dateTimeOriginal = localDateTime = earliestDate; } - this.logger.verbose( - `Found local date time ${localDateTime.toISOString()} for asset ${asset.id}: ${asset.originalPath}`, - ); + this.logger.verbose(`Found local date time ${localDateTime.toISO()} for asset ${asset.id}: ${asset.originalPath}`); return { - dateTimeOriginal, timeZone, - localDateTime, + localDateTime: localDateTime.toJSDate(), + dateTimeOriginal: dateTimeOriginal.toJSDate(), }; } - private hasGeo(tags: ImmichTags): tags is ImmichTags & { GPSLatitude: number; GPSLongitude: number } { - return ( - tags.GPSLatitude !== undefined && - tags.GPSLongitude !== undefined && - (tags.GPSLatitude !== 0 || tags.GPSLatitude !== 0) - ); + private hasGeo(tags: ImmichTags) { + const lat = Number(tags.GPSLatitude); + const lng = Number(tags.GPSLongitude); + return !Number.isNaN(lat) && !Number.isNaN(lng) && (lat !== 0 || lng !== 0); } private getAutoStackId(tags: ImmichTags | null): string | null { diff --git a/server/src/services/tag.service.spec.ts b/server/src/services/tag.service.spec.ts index 6699c61970..6a630de6a1 100644 --- a/server/src/services/tag.service.spec.ts +++ b/server/src/services/tag.service.spec.ts @@ -192,12 +192,12 @@ describe(TagService.name, () => { mocks.access.tag.checkOwnerAccess.mockResolvedValue(new Set(['tag-1', 'tag-2'])); mocks.access.asset.checkOwnerAccess.mockResolvedValue(new Set(['asset-1', 'asset-2', 'asset-3'])); mocks.tag.upsertAssetIds.mockResolvedValue([ - { tagsId: 'tag-1', assetsId: 'asset-1' }, - { tagsId: 'tag-1', assetsId: 'asset-2' }, - { tagsId: 'tag-1', assetsId: 'asset-3' }, - { tagsId: 'tag-2', assetsId: 'asset-1' }, - { tagsId: 'tag-2', assetsId: 'asset-2' }, - { tagsId: 'tag-2', assetsId: 'asset-3' }, + { tagId: 'tag-1', assetId: 'asset-1' }, + { tagId: 'tag-1', assetId: 'asset-2' }, + { tagId: 'tag-1', assetId: 'asset-3' }, + { tagId: 'tag-2', assetId: 'asset-1' }, + { tagId: 'tag-2', assetId: 'asset-2' }, + { tagId: 'tag-2', assetId: 'asset-3' }, ]); await expect( sut.bulkTagAssets(authStub.admin, { tagIds: ['tag-1', 'tag-2'], assetIds: ['asset-1', 'asset-2', 'asset-3'] }), @@ -205,12 +205,12 @@ describe(TagService.name, () => { count: 6, }); expect(mocks.tag.upsertAssetIds).toHaveBeenCalledWith([ - { tagsId: 'tag-1', assetsId: 'asset-1' }, - { tagsId: 'tag-1', assetsId: 'asset-2' }, - { tagsId: 'tag-1', assetsId: 'asset-3' }, - { tagsId: 'tag-2', assetsId: 'asset-1' }, - { tagsId: 'tag-2', assetsId: 'asset-2' }, - { tagsId: 'tag-2', assetsId: 'asset-3' }, + { tagId: 'tag-1', assetId: 'asset-1' }, + { tagId: 'tag-1', assetId: 'asset-2' }, + { tagId: 'tag-1', assetId: 'asset-3' }, + { tagId: 'tag-2', assetId: 'asset-1' }, + { tagId: 'tag-2', assetId: 'asset-2' }, + { tagId: 'tag-2', assetId: 'asset-3' }, ]); }); }); diff --git a/server/src/services/tag.service.ts b/server/src/services/tag.service.ts index 2fae4b55d0..3ee5d29b75 100644 --- a/server/src/services/tag.service.ts +++ b/server/src/services/tag.service.ts @@ -82,14 +82,14 @@ export class TagService extends BaseService { ]); const items: Insertable[] = []; - for (const tagsId of tagIds) { - for (const assetsId of assetIds) { - items.push({ tagsId, assetsId }); + for (const tagId of tagIds) { + for (const assetId of assetIds) { + items.push({ tagId, assetId }); } } const results = await this.tagRepository.upsertAssetIds(items); - for (const assetId of new Set(results.map((item) => item.assetsId))) { + for (const assetId of new Set(results.map((item) => item.assetId))) { await this.eventRepository.emit('AssetTag', { assetId }); } diff --git a/server/src/types.ts b/server/src/types.ts index 049e78cc23..52ef591b35 100644 --- a/server/src/types.ts +++ b/server/src/types.ts @@ -499,6 +499,7 @@ export interface UserPreferences { }; memories: { enabled: boolean; + duration: number; }; people: { enabled: boolean; diff --git a/server/src/utils/database.ts b/server/src/utils/database.ts index 8c05543eaa..0cc3788f1a 100644 --- a/server/src/utils/database.ts +++ b/server/src/utils/database.ts @@ -244,12 +244,12 @@ export function inAlbums(qb: SelectQueryBuilder, albumIds: st (eb) => eb .selectFrom('album_asset') - .select('assetsId') - .where('albumsId', '=', anyUuid(albumIds!)) - .groupBy('assetsId') - .having((eb) => eb.fn.count('albumsId').distinct(), '=', albumIds.length) + .select('assetId') + .where('albumId', '=', anyUuid(albumIds!)) + .groupBy('assetId') + .having((eb) => eb.fn.count('albumId').distinct(), '=', albumIds.length) .as('has_album'), - (join) => join.onRef('has_album.assetsId', '=', 'asset.id'), + (join) => join.onRef('has_album.assetId', '=', 'asset.id'), ); } @@ -258,13 +258,13 @@ export function hasTags(qb: SelectQueryBuilder, tagIds: strin (eb) => eb .selectFrom('tag_asset') - .select('assetsId') - .innerJoin('tag_closure', 'tag_asset.tagsId', 'tag_closure.id_descendant') + .select('assetId') + .innerJoin('tag_closure', 'tag_asset.tagId', 'tag_closure.id_descendant') .where('tag_closure.id_ancestor', '=', anyUuid(tagIds)) - .groupBy('assetsId') + .groupBy('assetId') .having((eb) => eb.fn.count('tag_closure.id_ancestor').distinct(), '>=', tagIds.length) .as('has_tags'), - (join) => join.onRef('has_tags.assetsId', '=', 'asset.id'), + (join) => join.onRef('has_tags.assetId', '=', 'asset.id'), ); } @@ -285,8 +285,8 @@ export function withTags(eb: ExpressionBuilder) { eb .selectFrom('tag') .select(columns.tag) - .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagsId') - .whereRef('asset.id', '=', 'tag_asset.assetsId'), + .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagId') + .whereRef('asset.id', '=', 'tag_asset.assetId'), ).as('tags'); } @@ -299,8 +299,8 @@ export function withTagId(qb: SelectQueryBuilder, tagId: stri eb.exists( eb .selectFrom('tag_closure') - .innerJoin('tag_asset', 'tag_asset.tagsId', 'tag_closure.id_descendant') - .whereRef('tag_asset.assetsId', '=', 'asset.id') + .innerJoin('tag_asset', 'tag_asset.tagId', 'tag_closure.id_descendant') + .whereRef('tag_asset.assetId', '=', 'asset.id') .where('tag_closure.id_ancestor', '=', tagId), ), ); @@ -320,7 +320,7 @@ export function searchAssetBuilder(kysely: Kysely, options: AssetSearchBuild .$if(!!options.albumIds && options.albumIds.length > 0, (qb) => inAlbums(qb, options.albumIds!)) .$if(!!options.tagIds && options.tagIds.length > 0, (qb) => hasTags(qb, options.tagIds!)) .$if(options.tagIds === null, (qb) => - qb.where((eb) => eb.not(eb.exists((eb) => eb.selectFrom('tag_asset').whereRef('assetsId', '=', 'asset.id')))), + qb.where((eb) => eb.not(eb.exists((eb) => eb.selectFrom('tag_asset').whereRef('assetId', '=', 'asset.id')))), ) .$if(!!options.personIds && options.personIds.length > 0, (qb) => hasPeople(qb, options.personIds!)) .$if(!!options.createdBefore, (qb) => qb.where('asset.createdAt', '<=', options.createdBefore!)) @@ -403,7 +403,7 @@ export function searchAssetBuilder(kysely: Kysely, options: AssetSearchBuild qb.where('asset.livePhotoVideoId', options.isMotion ? 'is not' : 'is', null), ) .$if(!!options.isNotInAlbum && (!options.albumIds || options.albumIds.length === 0), (qb) => - qb.where((eb) => eb.not(eb.exists((eb) => eb.selectFrom('album_asset').whereRef('assetsId', '=', 'asset.id')))), + qb.where((eb) => eb.not(eb.exists((eb) => eb.selectFrom('album_asset').whereRef('assetId', '=', 'asset.id')))), ) .$if(!!options.withExif, withExifInner) .$if(!!(options.withFaces || options.withPeople || options.personIds), (qb) => qb.select(withFacesAndPeople)) diff --git a/server/src/utils/misc.ts b/server/src/utils/misc.ts index b9741c3b44..eb548eab74 100644 --- a/server/src/utils/misc.ts +++ b/server/src/utils/misc.ts @@ -17,7 +17,7 @@ import path from 'node:path'; import picomatch from 'picomatch'; import parse from 'picomatch/lib/parse'; import { SystemConfig } from 'src/config'; -import { CLIP_MODEL_INFO, serverVersion } from 'src/constants'; +import { CLIP_MODEL_INFO, endpointTags, serverVersion } from 'src/constants'; import { extraSyncModels } from 'src/dtos/sync.dto'; import { ApiCustomExtension, ImmichCookie, ImmichHeader, MetadataKey } from 'src/enum'; import { LoggingRepository } from 'src/repositories/logging.repository'; @@ -218,25 +218,16 @@ const patchOpenAPI = (document: OpenAPIObject) => { delete operation.summary; } + if (operation.description === '') { + delete operation.description; + } + if (operation.operationId) { // console.log(`${routeToErrorMessage(operation.operationId).padEnd(40)} (${operation.operationId})`); } - const adminOnly = operation[ApiCustomExtension.AdminOnly] ?? false; - const permission = operation[ApiCustomExtension.Permission]; - if (permission) { - let description = (operation.description || '').trim(); - if (description && !description.endsWith('.')) { - description += '. '; - } - - operation.description = - description + - `This endpoint ${adminOnly ? 'is an admin-only route, and ' : ''}requires the \`${permission}\` permission.`; - - if (operation.parameters) { - operation.parameters = _.orderBy(operation.parameters, 'name'); - } + if (operation.parameters) { + operation.parameters = _.orderBy(operation.parameters, 'name'); } } } @@ -245,7 +236,7 @@ const patchOpenAPI = (document: OpenAPIObject) => { }; export const useSwagger = (app: INestApplication, { write }: { write: boolean }) => { - const config = new DocumentBuilder() + const builder = new DocumentBuilder() .setTitle('Immich') .setDescription('Immich API') .setVersion(serverVersion.toString()) @@ -263,8 +254,12 @@ export const useSwagger = (app: INestApplication, { write }: { write: boolean }) }, MetadataKey.ApiKeySecurity, ) - .addServer('/api') - .build(); + .addServer('/api'); + + for (const [tag, description] of Object.entries(endpointTags)) { + builder.addTag(tag, description); + } + const config = builder.build(); const options: SwaggerDocumentOptions = { operationIdFactory: (controllerKey: string, methodKey: string) => methodKey, diff --git a/server/src/utils/preferences.ts b/server/src/utils/preferences.ts index 121bf2826d..b25369670a 100644 --- a/server/src/utils/preferences.ts +++ b/server/src/utils/preferences.ts @@ -16,6 +16,7 @@ const getDefaultPreferences = (): UserPreferences => { }, memories: { enabled: true, + duration: 5, }, people: { enabled: true, diff --git a/server/test/medium.factory.ts b/server/test/medium.factory.ts index f332cc02e6..6167b6a6ff 100644 --- a/server/test/medium.factory.ts +++ b/server/test/medium.factory.ts @@ -2,6 +2,7 @@ import { Insertable, Kysely } from 'kysely'; import { DateTime } from 'luxon'; import { createHash, randomBytes } from 'node:crypto'; +import { Stats } from 'node:fs'; import { Writable } from 'node:stream'; import { AssetFace } from 'src/database'; import { AuthDto, LoginResponseDto } from 'src/dtos/auth.dto'; @@ -28,7 +29,9 @@ import { EventRepository } from 'src/repositories/event.repository'; import { JobRepository } from 'src/repositories/job.repository'; import { LoggingRepository } from 'src/repositories/logging.repository'; import { MachineLearningRepository } from 'src/repositories/machine-learning.repository'; +import { MapRepository } from 'src/repositories/map.repository'; import { MemoryRepository } from 'src/repositories/memory.repository'; +import { MetadataRepository } from 'src/repositories/metadata.repository'; import { NotificationRepository } from 'src/repositories/notification.repository'; import { OcrRepository } from 'src/repositories/ocr.repository'; import { PartnerRepository } from 'src/repositories/partner.repository'; @@ -61,7 +64,9 @@ import { TagAssetTable } from 'src/schema/tables/tag-asset.table'; import { TagTable } from 'src/schema/tables/tag.table'; import { UserTable } from 'src/schema/tables/user.table'; import { BASE_SERVICE_DEPENDENCIES, BaseService } from 'src/services/base.service'; +import { MetadataService } from 'src/services/metadata.service'; import { SyncService } from 'src/services/sync.service'; +import { mockEnvData } from 'test/repositories/config.repository.mock'; import { newTelemetryRepositoryMock } from 'test/repositories/telemetry.repository.mock'; import { factory, newDate, newEmbedding, newUuid } from 'test/small.factory'; import { automock, wait } from 'test/utils'; @@ -212,7 +217,7 @@ export class MediumTestContext { async newAlbumUser(dto: { albumId: string; userId: string; role?: AlbumUserRole }) { const { albumId, userId, role = AlbumUserRole.Editor } = dto; - const result = await this.get(AlbumUserRepository).create({ albumsId: albumId, usersId: userId, role }); + const result = await this.get(AlbumUserRepository).create({ albumId, userId, role }); return { albumUser: { albumId, userId, role }, result }; } @@ -255,9 +260,9 @@ export class MediumTestContext { async newTagAsset(tagBulkAssets: { tagIds: string[]; assetIds: string[] }) { const tagsAssets: Insertable[] = []; - for (const tagsId of tagBulkAssets.tagIds) { - for (const assetsId of tagBulkAssets.assetIds) { - tagsAssets.push({ tagsId, assetsId }); + for (const tagId of tagBulkAssets.tagIds) { + for (const assetId of tagBulkAssets.assetIds) { + tagsAssets.push({ tagId, assetId }); } } @@ -305,6 +310,63 @@ export class SyncTestContext extends MediumTestContext { } } +const mockDate = new Date('2024-06-01T12:00:00.000Z'); +const mockStats = { + mtime: mockDate, + atime: mockDate, + ctime: mockDate, + birthtime: mockDate, + atimeMs: 0, + mtimeMs: 0, + ctimeMs: 0, + birthtimeMs: 0, +}; + +export class ExifTestContext extends MediumTestContext { + constructor(database: Kysely) { + super(MetadataService, { + database, + real: [AssetRepository, AssetJobRepository, MetadataRepository, SystemMetadataRepository, TagRepository], + mock: [ConfigRepository, EventRepository, LoggingRepository, MapRepository, StorageRepository], + }); + + this.getMock(ConfigRepository).getEnv.mockReturnValue(mockEnvData({})); + this.getMock(EventRepository).emit.mockResolvedValue(); + this.getMock(MapRepository).reverseGeocode.mockResolvedValue({ country: null, state: null, city: null }); + this.getMock(StorageRepository).stat.mockResolvedValue(mockStats as Stats); + } + + getMockStats() { + return mockStats; + } + + getGps(assetId: string) { + return this.database + .selectFrom('asset_exif') + .select(['latitude', 'longitude']) + .where('assetId', '=', assetId) + .executeTakeFirstOrThrow(); + } + + getTags(assetId: string) { + return this.database + .selectFrom('tag') + .innerJoin('tag_asset', 'tag.id', 'tag_asset.tagId') + .where('tag_asset.assetId', '=', assetId) + .selectAll() + .execute(); + } + + getDates(assetId: string) { + return this.database + .selectFrom('asset') + .innerJoin('asset_exif', 'asset.id', 'asset_exif.assetId') + .where('id', '=', assetId) + .select(['asset.fileCreatedAt', 'asset.localDateTime', 'asset_exif.dateTimeOriginal', 'asset_exif.timeZone']) + .executeTakeFirstOrThrow(); + } +} + const newRealRepository = (key: ClassConstructor, db: Kysely): T => { switch (key) { case AccessRepository: @@ -344,6 +406,14 @@ const newRealRepository = (key: ClassConstructor, db: Kysely): T => { return new key(LoggingRepository.create()); } + case MetadataRepository: { + return new key(LoggingRepository.create()); + } + + case StorageRepository: { + return new key(LoggingRepository.create()); + } + case TagRepository: { return new key(db, LoggingRepository.create()); } @@ -381,6 +451,10 @@ const newMockRepository = (key: ClassConstructor) => { return automock(key); } + case MapRepository: { + return automock(MapRepository, { args: [undefined, undefined, { setContext: () => {} }] }); + } + case TelemetryRepository: { return newTelemetryRepositoryMock(); } diff --git a/server/test/medium/specs/exif/exif-date-time.spec.ts b/server/test/medium/specs/exif/exif-date-time.spec.ts new file mode 100644 index 0000000000..e46f17855e --- /dev/null +++ b/server/test/medium/specs/exif/exif-date-time.spec.ts @@ -0,0 +1,65 @@ +import { Kysely } from 'kysely'; +import { DateTime } from 'luxon'; +import { resolve } from 'node:path'; +import { DB } from 'src/schema'; +import { ExifTestContext } from 'test/medium.factory'; +import { getKyselyDB } from 'test/utils'; + +let database: Kysely; + +const setup = async (testAssetPath: string) => { + const ctx = new ExifTestContext(database); + + const { user } = await ctx.newUser(); + const originalPath = resolve(`../e2e/test-assets/${testAssetPath}`); + const { asset } = await ctx.newAsset({ ownerId: user.id, originalPath }); + + return { ctx, sut: ctx.sut, asset }; +}; + +beforeAll(async () => { + database = await getKyselyDB(); +}); + +describe('exif date time', () => { + it('should prioritize DateTimeOriginal', async () => { + const { ctx, sut, asset } = await setup('metadata/dates/date-priority-test.jpg'); + + await sut.handleMetadataExtraction({ id: asset.id }); + + await expect(ctx.getDates(asset.id)).resolves.toEqual({ + timeZone: null, + dateTimeOriginal: DateTime.fromISO('2023-02-02T02:00:00.000Z').toJSDate(), + localDateTime: DateTime.fromISO('2023-02-02T02:00:00.000Z').toJSDate(), + fileCreatedAt: DateTime.fromISO('2023-02-02T02:00:00.000Z').toJSDate(), + }); + }); + + it('should extract GPSDateTime with GPS coordinates ', async () => { + const { ctx, sut, asset } = await setup('metadata/dates/gps-datetime.jpg'); + + await sut.handleMetadataExtraction({ id: asset.id }); + + await expect(ctx.getDates(asset.id)).resolves.toEqual({ + timeZone: 'America/Los_Angeles', + dateTimeOriginal: DateTime.fromISO('2023-11-15T12:30:00.000Z').toJSDate(), + localDateTime: DateTime.fromISO('2023-11-15T04:30:00.000Z').toJSDate(), + fileCreatedAt: DateTime.fromISO('2023-11-15T12:30:00.000Z').toJSDate(), + }); + }); + + it('should ignore the TimeCreated tag', async () => { + const { ctx, sut, asset } = await setup('metadata/dates/time-created.jpg'); + + await sut.handleMetadataExtraction({ id: asset.id }); + + const stats = ctx.getMockStats(); + + await expect(ctx.getDates(asset.id)).resolves.toEqual({ + timeZone: null, + dateTimeOriginal: stats.mtime, + localDateTime: stats.mtime, + fileCreatedAt: stats.mtime, + }); + }); +}); diff --git a/server/test/medium/specs/exif/exif-gps.spec.ts b/server/test/medium/specs/exif/exif-gps.spec.ts new file mode 100644 index 0000000000..651321b599 --- /dev/null +++ b/server/test/medium/specs/exif/exif-gps.spec.ts @@ -0,0 +1,31 @@ +import { Kysely } from 'kysely'; +import { resolve } from 'node:path'; +import { DB } from 'src/schema'; +import { ExifTestContext } from 'test/medium.factory'; +import { getKyselyDB } from 'test/utils'; + +let database: Kysely; + +const setup = async (testAssetPath: string) => { + const ctx = new ExifTestContext(database); + + const { user } = await ctx.newUser(); + const originalPath = resolve(`../e2e/test-assets/${testAssetPath}`); + const { asset } = await ctx.newAsset({ ownerId: user.id, originalPath }); + + return { ctx, sut: ctx.sut, asset }; +}; + +beforeAll(async () => { + database = await getKyselyDB(); +}); + +describe('exif gps', () => { + it('should handle empty strings', async () => { + const { ctx, sut, asset } = await setup('metadata/gps-position/empty_gps.jpg'); + + await sut.handleMetadataExtraction({ id: asset.id }); + + await expect(ctx.getGps(asset.id)).resolves.toEqual({ latitude: null, longitude: null }); + }); +}); diff --git a/server/test/medium/specs/exif/exif-tags.spec.ts b/server/test/medium/specs/exif/exif-tags.spec.ts new file mode 100644 index 0000000000..33a81d24b6 --- /dev/null +++ b/server/test/medium/specs/exif/exif-tags.spec.ts @@ -0,0 +1,34 @@ +import { Kysely } from 'kysely'; +import { resolve } from 'node:path'; +import { DB } from 'src/schema'; +import { ExifTestContext } from 'test/medium.factory'; +import { getKyselyDB } from 'test/utils'; + +let database: Kysely; + +const setup = async (testAssetPath: string) => { + const ctx = new ExifTestContext(database); + + const { user } = await ctx.newUser(); + const originalPath = resolve(`../e2e/test-assets/${testAssetPath}`); + const { asset } = await ctx.newAsset({ ownerId: user.id, originalPath }); + + return { ctx, sut: ctx.sut, asset }; +}; + +beforeAll(async () => { + database = await getKyselyDB(); +}); + +describe('exif tags', () => { + it('should detect and regular tags', async () => { + const { ctx, sut, asset } = await setup('metadata/tags/picasa.jpg'); + + await sut.handleMetadataExtraction({ id: asset.id }); + + await expect(ctx.getTags(asset.id)).resolves.toEqual([ + expect.objectContaining({ assetId: asset.id, value: 'Frost', parentId: null }), + expect.objectContaining({ assetId: asset.id, value: 'Yard', parentId: null }), + ]); + }); +}); diff --git a/server/test/medium/specs/services/metadata.service.spec.ts b/server/test/medium/specs/services/metadata.service.spec.ts index 13b9867373..5d44079be5 100644 --- a/server/test/medium/specs/services/metadata.service.spec.ts +++ b/server/test/medium/specs/services/metadata.service.spec.ts @@ -65,42 +65,6 @@ describe(MetadataService.name, () => { timeZone: null, }, }, - { - description: 'should handle no time zone information and server behind UTC', - serverTimeZone: 'America/Los_Angeles', - exifData: { - DateTimeOriginal: '2022:01:01 00:00:00', - }, - expected: { - localDateTime: '2022-01-01T00:00:00.000Z', - dateTimeOriginal: '2022-01-01T08:00:00.000Z', - timeZone: null, - }, - }, - { - description: 'should handle no time zone information and server ahead of UTC', - serverTimeZone: 'Europe/Brussels', - exifData: { - DateTimeOriginal: '2022:01:01 00:00:00', - }, - expected: { - localDateTime: '2022-01-01T00:00:00.000Z', - dateTimeOriginal: '2021-12-31T23:00:00.000Z', - timeZone: null, - }, - }, - { - description: 'should handle no time zone information and server ahead of UTC in the summer', - serverTimeZone: 'Europe/Brussels', - exifData: { - DateTimeOriginal: '2022:06:01 00:00:00', - }, - expected: { - localDateTime: '2022-06-01T00:00:00.000Z', - dateTimeOriginal: '2022-05-31T22:00:00.000Z', - timeZone: null, - }, - }, { description: 'should handle a +13:00 time zone', exifData: { diff --git a/server/test/medium/specs/sync/sync-album-user.spec.ts b/server/test/medium/specs/sync/sync-album-user.spec.ts index d779ffd9f3..4970995d28 100644 --- a/server/test/medium/specs/sync/sync-album-user.spec.ts +++ b/server/test/medium/specs/sync/sync-album-user.spec.ts @@ -74,7 +74,7 @@ describe(SyncRequestType.AlbumUsersV1, () => { await ctx.syncAckAll(auth, response); await ctx.assertSyncIsComplete(auth, [SyncRequestType.AlbumUsersV1]); - await albumUserRepo.update({ albumsId: album.id, usersId: user1.id }, { role: AlbumUserRole.Viewer }); + await albumUserRepo.update({ albumId: album.id, userId: user1.id }, { role: AlbumUserRole.Viewer }); const newResponse = await ctx.syncStream(auth, [SyncRequestType.AlbumUsersV1]); expect(newResponse).toEqual([ { @@ -104,7 +104,7 @@ describe(SyncRequestType.AlbumUsersV1, () => { await ctx.syncAckAll(auth, response); await ctx.assertSyncIsComplete(auth, [SyncRequestType.AlbumUsersV1]); - await albumUserRepo.delete({ albumsId: album.id, usersId: user1.id }); + await albumUserRepo.delete({ albumId: album.id, userId: user1.id }); const newResponse = await ctx.syncStream(auth, [SyncRequestType.AlbumUsersV1]); expect(newResponse).toEqual([ { @@ -171,7 +171,7 @@ describe(SyncRequestType.AlbumUsersV1, () => { await ctx.syncAckAll(auth, response); await ctx.assertSyncIsComplete(auth, [SyncRequestType.AlbumUsersV1]); - await albumUserRepo.update({ albumsId: album.id, usersId: user.id }, { role: AlbumUserRole.Viewer }); + await albumUserRepo.update({ albumId: album.id, userId: user.id }, { role: AlbumUserRole.Viewer }); const newResponse = await ctx.syncStream(auth, [SyncRequestType.AlbumUsersV1]); expect(newResponse).toEqual([ { @@ -208,7 +208,7 @@ describe(SyncRequestType.AlbumUsersV1, () => { await ctx.syncAckAll(auth, response); await ctx.assertSyncIsComplete(auth, [SyncRequestType.AlbumUsersV1]); - await albumUserRepo.delete({ albumsId: album.id, usersId: user.id }); + await albumUserRepo.delete({ albumId: album.id, userId: user.id }); const newResponse = await ctx.syncStream(auth, [SyncRequestType.AlbumUsersV1]); expect(newResponse).toEqual([ diff --git a/server/test/medium/specs/sync/sync-album.spec.ts b/server/test/medium/specs/sync/sync-album.spec.ts index 591d7e1f3c..02536e3a8d 100644 --- a/server/test/medium/specs/sync/sync-album.spec.ts +++ b/server/test/medium/specs/sync/sync-album.spec.ts @@ -217,7 +217,7 @@ describe(SyncRequestType.AlbumsV1, () => { await ctx.syncAckAll(auth, response); await ctx.assertSyncIsComplete(auth, [SyncRequestType.AlbumsV1]); - await albumUserRepo.delete({ albumsId: album.id, usersId: auth.user.id }); + await albumUserRepo.delete({ albumId: album.id, userId: auth.user.id }); const newResponse = await ctx.syncStream(auth, [SyncRequestType.AlbumsV1]); expect(newResponse).toEqual([ { diff --git a/web/mise.toml b/web/mise.toml new file mode 100644 index 0000000000..5aca2d737d --- /dev/null +++ b/web/mise.toml @@ -0,0 +1,62 @@ +[tasks.install] +run = "pnpm install --filter immich-web --frozen-lockfile" + +[tasks."svelte-kit-sync"] +env._.path = "./node_modules/.bin" +run = "svelte-kit sync" + +[tasks.build] +env._.path = "./node_modules/.bin" +run = "vite build" + +[tasks."build-stats"] +env.BUILD_STATS = "true" +env._.path = "./node_modules/.bin" +run = "vite build" + +[tasks.preview] +env._.path = "./node_modules/.bin" +run = "vite preview" + +[tasks.start] +env._.path = "./node_modules/.bin" +run = "vite dev --host 0.0.0.0 --port 3000" + +[tasks.test] +depends = ["svelte-kit-sync"] +env._.path = "./node_modules/.bin" +run = "vitest" + +[tasks.format] +env._.path = "./node_modules/.bin" +run = "prettier --check ." + +[tasks."format-fix"] +env._.path = "./node_modules/.bin" +run = "prettier --write ." + +[tasks.lint] +env._.path = "./node_modules/.bin" +run = "eslint . --max-warnings 0 --concurrency 4" + +[tasks."lint-fix"] +run = { task = "lint --fix" } + +[tasks.check] +depends = ["svelte-kit-sync"] +env._.path = "./node_modules/.bin" +run = "tsc --noEmit" + +[tasks."check-svelte"] +depends = ["svelte-kit-sync"] +env._.path = "./node_modules/.bin" +run = "svelte-check --no-tsconfig --fail-on-warnings" + +[tasks.checklist] +run = [ + { task = ":install" }, + { task = ":format" }, + { task = ":check" }, + { task = ":test --run" }, + { task = ":lint" }, +] diff --git a/web/package.json b/web/package.json index 791fc8d982..2a93230c24 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "immich-web", - "version": "2.2.0", + "version": "2.2.3", "license": "GNU Affero General Public License version 3", "type": "module", "scripts": { @@ -28,7 +28,7 @@ "@formatjs/icu-messageformat-parser": "^2.9.8", "@immich/justified-layout-wasm": "^0.4.3", "@immich/sdk": "file:../open-api/typescript-sdk", - "@immich/ui": "^0.40.2", + "@immich/ui": "^0.43.0", "@mapbox/mapbox-gl-rtl-text": "0.2.3", "@mdi/js": "^7.4.47", "@photo-sphere-viewer/core": "^5.11.5", @@ -57,7 +57,7 @@ "socket.io-client": "~4.8.0", "svelte-gestures": "^5.2.2", "svelte-i18n": "^4.0.1", - "svelte-maplibre": "^1.2.0", + "svelte-maplibre": "^1.2.5", "svelte-persisted-store": "^0.12.0", "tabbable": "^6.2.0", "thumbhash": "^0.1.1" @@ -96,7 +96,7 @@ "prettier-plugin-sort-json": "^4.1.1", "prettier-plugin-svelte": "^3.3.3", "rollup-plugin-visualizer": "^6.0.0", - "svelte": "5.41.3", + "svelte": "5.43.0", "svelte-check": "^4.1.5", "svelte-eslint-parser": "^1.3.3", "tailwindcss": "^4.1.7", diff --git a/web/src/lib/components/ActionButton.svelte b/web/src/lib/components/ActionButton.svelte new file mode 100644 index 0000000000..37bc09fb73 --- /dev/null +++ b/web/src/lib/components/ActionButton.svelte @@ -0,0 +1,16 @@ + + +{#if action.$if?.() ?? true} + +{/if} diff --git a/web/src/lib/components/ApiKeyPermissionsPicker.svelte b/web/src/lib/components/ApiKeyPermissionsPicker.svelte new file mode 100644 index 0000000000..ecdb68b038 --- /dev/null +++ b/web/src/lib/components/ApiKeyPermissionsPicker.svelte @@ -0,0 +1,78 @@ + + +